Bob Wilson
6120d6272e
Remove "-Wl,-seg1addr -Wl,0xE0000000" from link options.
...
Specifying the load address for Darwin i386 dylibs was a performance
optimization for dyld that is not relevant for x86_64 or arm. We can just
remove this now.
llvm-svn: 183230
2013-06-04 15:26:37 +00:00
Nick Lewycky
d5ddefbd79
Remove GCDAProfiling.c. This copy is old, the copy in compiler-rt is newer and
...
is the one that should be used.
llvm-svn: 176608
2013-03-07 02:03:08 +00:00
Nick Lewycky
c6d84d23b9
Forgot that this file needs to be C89 not C99 thanks to MSVC. No functionality
...
change!
llvm-svn: 176176
2013-02-27 08:28:35 +00:00
Nick Lewycky
7f68cef53a
In GCC 4.7, function names are now forbidden from .gcda files. Support this by
...
passing a null pointer to the function name in to GCDAProfiling, and add another
switch onto GCOVProfiling.
llvm-svn: 176173
2013-02-27 06:22:56 +00:00
Bill Wendling
2917cd46a7
Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in the Apple way.
...
llvm-svn: 175069
2013-02-13 19:44:08 +00:00
NAKAMURA Takumi
a80d897819
libprofile/CommonProfiling.c: Fix according to C89.
...
llvm-svn: 167272
2012-11-02 01:32:02 +00:00
Manman Ren
8a54a612ab
PGO: allows the profile data file name to be specified by the LLVMPROF_OUTPUT
...
environment variable.
This allows parallel make for profiling code, without it there are file
collisions as each parallel run uses the default file name.
There is already code in the runtime library to specify the output file name
via the command line, but this only works for programs which already process
argc/argv. This patch builds on that support.
Patch by Alastair Murray.
llvm-svn: 167269
2012-11-02 01:10:15 +00:00
Bill Wendling
8a5011ea75
Place temporary LTO files into their own subdirectory.
...
llvm-svn: 165599
2012-10-10 05:29:15 +00:00
Bob Wilson
c0aea11834
Revert "Use a special path to place the .o files in."
...
This reverts commit 165428 in an attempt to get our buildbots going.
llvm-svn: 165574
2012-10-09 23:59:01 +00:00
Bill Wendling
0d7223be5c
Use a special path to place the .o files in.
...
llvm-svn: 165428
2012-10-08 21:17:45 +00:00
Bill Wendling
f91027b750
Add an explicit -object_path_lto flag during linking with a uniquified temporary
...
file name if building Apple-style.
llvm-svn: 165185
2012-10-03 23:52:10 +00:00
NAKAMURA Takumi
5c025c67e6
libprofile: [CMake] Let libprofile_rt be not loadable_module but shared library. Autoconf's one does so.
...
llvm-svn: 162812
2012-08-29 00:37:51 +00:00
Manman Ren
15cce6cb87
Profile: move a single enum out of ProfileInfoTypes.h into a new
...
ProfileDataTypes.h header.
With this patch the old and new profiling code can exist side-by-side. The new
profiling code will be submitted soon and it only supports insert-edge-profiling
for now and will not depend on ProfileInfo.
Patch by Alastair Murray.
llvm-svn: 162576
2012-08-24 18:31:44 +00:00
Bill Wendling
33d8ca2ddc
Free the allocated filename. Found by clang static analyzer.
...
llvm-svn: 158513
2012-06-15 09:11:47 +00:00
Bill Wendling
a909ffb08b
Small code cleanup. No functionality change.
...
llvm-svn: 157502
2012-05-25 21:57:59 +00:00
Bill Wendling
3651e385d6
Open in read/write mode, creating the file if it doesn't exist.
...
llvm-svn: 157501
2012-05-25 21:55:06 +00:00
Bill Wendling
df1d6dcf47
Early-continue.Reducing indentation.
...
llvm-svn: 157451
2012-05-25 00:57:21 +00:00
Bill Wendling
9bf37abe42
Don't call exit from a runtime.
...
llvm-svn: 157450
2012-05-25 00:55:38 +00:00
David Blaikie
00a231aa73
Switch to c-style comments in a C file.
...
llvm-svn: 155726
2012-04-27 19:30:29 +00:00
Ted Kremenek
ec38ddb19c
Defensively guard against calling malloc() with a size of zero.
...
llvm-svn: 155661
2012-04-26 20:54:27 +00:00
Bill Wendling
8d0a85a379
Use the correct filename for the error message.
...
llvm-svn: 153564
2012-03-28 02:39:06 +00:00
Bill Wendling
ec11c59c98
Use Nakamura's suggestion of bypassing using 'filename' and just the pointers directly.
...
llvm-svn: 153558
2012-03-28 01:30:51 +00:00
Francois Pichet
d04f23f329
MSVC doesn't like the mixing of declarations and statements in a .c file.
...
llvm-svn: 153549
2012-03-27 23:52:22 +00:00
Bill Wendling
5c8d6c7990
Try to use the CWD if the path to the GCDA output is not available (e.g., the
...
executable has been moved to another machine). If that's not available
(read-only or something), then exit gracefully.
<rdar://problem/11111686>
llvm-svn: 153538
2012-03-27 21:17:04 +00:00
Aaron Ballman
5ea088c8c2
Fixing a warning in MSVC (this is also a test commit)
...
llvm-svn: 149844
2012-02-05 19:43:39 +00:00
Daniel Dunbar
30d6a45140
LLVMBuild: Remove trailing newline, which irked me.
...
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
NAKAMURA Takumi
a40fc9b826
PathProfiling.c: Get rid of using "inline". We may expect compiler shall optimize out "static" scope w/o "inline".
...
llvm-svn: 144080
2011-11-08 12:03:14 +00:00
NAKAMURA Takumi
e30a3a9d85
runtime/libprofile/PathProfiling.c: Use __inline__ to appease clang -std=gnu89 -pedantic.
...
FIXME: Should configure detect one?
llvm-svn: 144070
2011-11-08 03:54:40 +00:00
Daniel Dunbar
3760ebeebb
build: Add initial cut at LLVMBuild.txt files.
...
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Benjamin Kramer
22607ddb94
Include direct.h for _mkdir on mingw32 too.
...
llvm-svn: 141495
2011-10-08 15:49:19 +00:00
Galina Kistanova
95b887e917
Fix for warnings: ignoring return value of ‘write’, declared with attribute warn_unused_result.
...
llvm-svn: 140314
2011-09-22 17:33:24 +00:00
Bill Wendling
8f7bb614ea
Use version 402 for the GCDA files when compiling for Apple.
...
llvm-svn: 136369
2011-07-28 18:12:20 +00:00
Bill Wendling
f3325864ce
Build and install the archive when building the Apple way.
...
llvm-svn: 135538
2011-07-19 23:33:42 +00:00
Eli Friedman
2c7773157c
Fix build for (some versions of?) MinGW. Patch by Ruben Van Boxem.
...
llvm-svn: 133741
2011-06-23 18:24:27 +00:00
Bill Wendling
108a793705
Remove the LTO stuff from the profile_rt library's Makefile.
...
llvm-svn: 133042
2011-06-15 04:56:13 +00:00
Bill Wendling
a3941782e9
Add compatibility version when compiling the Apple way.
...
<rdar://problem/9600408>
llvm-svn: 132929
2011-06-13 20:14:37 +00:00
Francois Pichet
3d8581cca9
Fix MSVC warning regarding mkdir function usage.
...
llvm-svn: 132109
2011-05-26 04:55:20 +00:00
Francois Pichet
b8f50b86bc
Fix 3 MSVC warnings:
...
'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'
atexit really expects a "void f(void)" function.
llvm-svn: 132061
2011-05-25 16:32:33 +00:00
Nick Lewycky
eef7bead41
The computation of string length is not that complicated. Fix it, again. :)
...
llvm-svn: 130967
2011-05-05 23:52:18 +00:00
Nick Lewycky
c537bf5a97
Update the gcov version used slightly, to make it stop causing modern gcov's to
...
crash.
llvm-svn: 130911
2011-05-05 02:46:38 +00:00
Nick Lewycky
e3e47cc4d8
Create the parent directories to place the .gcda files in if they don't exist.
...
That's kinda weird because the .gcno files are supposed to already be there,
but libgcov does this and somehow Google has managed to depend on it.
llvm-svn: 130879
2011-05-04 22:34:29 +00:00
Nick Lewycky
75424d52d7
Fix crash when not setting GCOV_PREFIX.
...
llvm-svn: 130834
2011-05-04 03:58:45 +00:00
NAKAMURA Takumi
f485b6e3a8
runtime/libprofile/PathProfiling.c: Don't use // comment in C source.
...
llvm-svn: 130589
2011-04-30 03:53:56 +00:00
Daniel Dunbar
64d3760882
win32: Include DataTypes.h instead of stdint.h to try and fix a Win32 build
...
issue.
llvm-svn: 130530
2011-04-29 18:58:57 +00:00
Daniel Dunbar
33083542c4
Cleanup some DOS newlines.
...
llvm-svn: 130529
2011-04-29 18:58:55 +00:00
Francois Pichet
4c0e0098a5
Unbreak the MSVC build:
...
- unistd.h doesn't exist with MSVC
- inline must be __inline in Microsoft C
- atexit cannot take a function declared as void f(), must be void f(void).
llvm-svn: 130490
2011-04-29 08:56:07 +00:00
Nick Lewycky
ea1dbad689
Rename profile_rt.so to libprofile_rt.so under configure+make (it already was
...
under cmake).
Add libprofile_rt.a so that we can tell clang to link against it in --coverage
mode. Also turn it on by default in cmake builds.
Oscar, this touches a change you made for EXCLUDE_FROM_ALL support -- I think
I've done the right thing, but please let me know (or fix and commit) if not!
llvm-svn: 130470
2011-04-29 02:12:06 +00:00
Nick Lewycky
40c59f95d7
Only read *predecessor once so as to fix a theoretical issue where it changes
...
between two reads (threading).
Fix an off-by-one in the indirect counter table that I meant to revert after an
earlier experiment. Whoops!
Implement GCOV_PREFIX. Doesn't handle GCOV_PREFIX_STRIP yet.
Fix an off-by-one in string emission. Extra whoops!
Tolerate DISubprograms that have null Function*'s attached to them. I don't yet
understand what this means, but it happens when you have a global static with
a non-trivial constructor/destructor.
Fix a crash on switch statements with a single successor (default-only).
llvm-svn: 130443
2011-04-28 21:35:49 +00:00
Nick Lewycky
0a9ef78096
Use static inline to do the right thing when built in C99 mode. Of course,
...
C89 doesn't have an inline keyword.
llvm-svn: 130279
2011-04-27 03:22:17 +00:00
Oscar Fuentes
246a11f21c
Honor LLVM_BUILD_RUNTIME.
...
llvm-svn: 130199
2011-04-26 14:55:27 +00:00