Chandler Carruth
69dd8d673c
Mark this variable as used.
...
llvm-svn: 110667
2010-08-10 10:39:25 +00:00
Chris Lattner
838e42928b
remove code setting rw locks to PTHREAD_PROCESS_PRIVATE, which
...
is the default. Patch by NAKAMURA Takumi!
llvm-svn: 110636
2010-08-10 00:34:06 +00:00
Dan Gohman
227c4f64ac
Eliminate unnecessary empty string literals.
...
llvm-svn: 110183
2010-08-04 01:39:08 +00:00
Owen Anderson
8769f9a8dd
Add an erase() method to llvm::ThreadLocal.
...
llvm-svn: 109686
2010-07-28 22:49:43 +00:00
Duncan Sands
b0f45f192c
Rather than using an ifdef on the target to zero out fields,
...
just use memset to zero the entire struct.
llvm-svn: 108330
2010-07-14 14:32:33 +00:00
Duncan Sands
f7b98e2b1e
Convert some tab stops into spaces.
...
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chris Lattner
58dad00aa5
Path::isRootDirectory is unimplemented on Unix and not used,
...
remove it, fixing PR6909.
llvm-svn: 108125
2010-07-12 04:39:07 +00:00
Chris Lattner
a94ea82dac
improve Path::makeUnique when mkstemp/mktemp are not available
...
patch by Lasse Kärkkäinen in PR7404.
llvm-svn: 108110
2010-07-12 00:09:55 +00:00
Chris Lattner
96566c78ef
add some triple for minix, patch by Kees van Reeuwijk from PR7582
...
llvm-svn: 107785
2010-07-07 15:52:27 +00:00
Duncan Sands
48e353b393
Avoid "variable 'bits' set but not used [-Wunused-but-set-variable]"
...
warnings with gcc-4.6, by not setting bits when the result is not
used.
llvm-svn: 105790
2010-06-10 16:23:15 +00:00
Dan Gohman
b049874698
Factor out the handler work from SignalHandler into a helper function,
...
and change llvm::sys::RunInterruptHandlers to call that function directly
instead of calling SignalHandler, because the rest of SignalHandler
invokes side effects which aren't appropriate, including raising the
signal.
llvm-svn: 104896
2010-05-27 23:11:55 +00:00
Dan Gohman
31980d4fb9
Don't bother clearing the Magic string when the magic number
...
can't be read, since it isn't cleared on other error paths.
llvm-svn: 104852
2010-05-27 17:14:10 +00:00
Dan Gohman
91a7dd7cb6
Don't bother checking canRead() before calling getMagicNumber();
...
getMagicNumber() does its own error checking.
llvm-svn: 104851
2010-05-27 17:12:23 +00:00
Daniel Dunbar
1457d51ff8
Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanup
...
stuff.
llvm-svn: 103333
2010-05-08 02:10:34 +00:00
Dan Gohman
caa827af2c
This doesn't need SmallVector.h anymore.
...
llvm-svn: 101790
2010-04-19 17:51:31 +00:00
Dan Gohman
ede59ecfbb
Fix this for std::vectors which don't have .data().
...
llvm-svn: 101785
2010-04-19 16:33:28 +00:00
Dan Gohman
e2e1b9063a
Fix -Wcast-qual warnings.
...
llvm-svn: 101782
2010-04-19 15:55:10 +00:00
Dan Gohman
735c177251
Revert 91528 and use a std::vector instead, fixing an abuse of std::string.
...
llvm-svn: 101781
2010-04-19 15:54:44 +00:00
Chris Lattner
746abd86e7
avoid temporary std::string in non posix_spawn path.
...
llvm-svn: 101723
2010-04-18 17:34:10 +00:00
Benjamin Kramer
2cade0b3ff
Eliminate temporary string.
...
llvm-svn: 101711
2010-04-18 09:19:41 +00:00
Benjamin Kramer
6f6354213f
Properly inherit the environment on darwin where environ is not available for shared libraries.
...
llvm-svn: 101710
2010-04-18 09:16:04 +00:00
Nick Lewycky
152b2bc046
This is horrible. Split the difference, and declare 'environ' on all non-Darwin
...
platforms to unbreak the darwin and linux builds. The BSD folks should feel
free to change the #if, if this breaks them.
llvm-svn: 101703
2010-04-18 07:07:48 +00:00
Nick Lewycky
459afe3cce
Revert r101701, Darwin doesn't have 'environ'. Go figure.
...
llvm-svn: 101702
2010-04-18 06:44:21 +00:00
Nick Lewycky
2b694c49bb
Fix linux build. posix_spawn doesn't inherit the environment by default.
...
llvm-svn: 101701
2010-04-18 06:22:26 +00:00
Chris Lattner
22b58ac393
make Program::Execute use posix_spawn on systems that support it,
...
as it is more efficient than fork/exec.
Thanks to Eric for adding the autoconf check. It would be nice if
a cmake guru could add a cmake check for posix_spawn as well.
llvm-svn: 101693
2010-04-18 04:14:37 +00:00
Chris Lattner
49c39866b3
unnest from namespace.
...
llvm-svn: 101691
2010-04-18 03:33:55 +00:00
Dan Gohman
d48633d340
Fix a bunch of namespace polution.
...
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Chris Lattner
bb78eb4d82
improve haiku portability, patch by Paul Davey.
...
llvm-svn: 100933
2010-04-10 17:54:51 +00:00
Chris Lattner
9d77e5ba47
add minix support, patch by Kees van Reeuwijk! PR6797
...
llvm-svn: 100895
2010-04-09 20:45:04 +00:00
Torok Edwin
ba2f97fcb0
AddSignalHandler was not releasing the critical section on win32.
...
Patch from Gianluigi Tiesi!
llvm-svn: 100003
2010-03-31 12:07:16 +00:00
Dan Gohman
4bdd10c6df
Fix a grammaro.
...
llvm-svn: 99917
2010-03-30 20:04:57 +00:00
Anton Korobeynikov
3df01d9637
Properly quote the quotes :) during cmdline construction on Windows.
...
Otherwise, e.g. in the invocation like clang -DFOO=\"bar\" FOO macro
got the bar value, not "bar".
Patch by Alexander Esilevich!
llvm-svn: 99763
2010-03-28 15:07:02 +00:00
Chris Lattner
be06cb7f99
remove a constructor implementation that isn't declared
...
in the header. How can both clang and gcc accept this?
PR6703
llvm-svn: 99658
2010-03-26 22:17:24 +00:00
Jeffrey Yasskin
58964f4bee
Fix a false-positive memory leak in code using RemoveFileOnSignal(). Because
...
libstdc++'s std::string class points to the interior of an allocation, valgrind
reports strings still alive at program termination as possible leaks. I didn't
use a ManagedStatic for this because System can't depend on Support.
llvm-svn: 98716
2010-03-17 07:08:12 +00:00
Jeffrey Yasskin
f468a14fb1
Tell Valgrind when we modify already-executed machine code so it knows
...
to re-instrument the code. We depend on the system valgrind.h to
avoid adding a new license.
llvm-svn: 98529
2010-03-15 04:57:55 +00:00
Chris Lattner
aa217407b9
don't forget to close a FD on an error condition, found by
...
cppcheck, PR6617. Patch by Ettl Martin!
llvm-svn: 98525
2010-03-14 23:16:45 +00:00
Kovarththanan Rajaratnam
96530a3830
Remove superfluous NULL assignment
...
llvm-svn: 98350
2010-03-12 14:17:24 +00:00
Ted Kremenek
9f2c113fab
Update CMake build.
...
llvm-svn: 98250
2010-03-11 07:51:23 +00:00
Jeffrey Yasskin
46115632ba
Make clang bootstrap happier on OSX 10.5 by reducing the number of headers
...
included when using global symbols to ask the linker for the addresses of
various functions. One of the symbols was actually getting declared by a
header included in DynamicLibrary.cpp, which conflicted with the "extern void*"
declaration in SearchForAddressOfSpecialSymbol().
llvm-svn: 98243
2010-03-11 06:14:32 +00:00
Chris Lattner
42c8f96141
follow-on to PR6280
...
llvm-svn: 96172
2010-02-14 18:20:09 +00:00
Chris Lattner
f6aca786be
improve support for minix, PR6280, patch by
...
Kees van Reeuwijk!
llvm-svn: 95946
2010-02-12 00:37:46 +00:00
Douglas Gregor
1fcfb8e183
Add llvm::Program::ChangeStderrToBinary().
...
llvm-svn: 94743
2010-01-28 06:42:08 +00:00
Chris Lattner
397d34f06b
mark some libraries that currently require RTTI.
...
llvm-svn: 94377
2010-01-24 20:22:08 +00:00
Torok Edwin
46925cc515
Fix TimeValue::now() on Unix.
...
TimeValue()::now().toEpochTime() is supposed to be the same as time(),
but it wasn't, because toEpoch subtracted PosixZeroTime, but now()
didn't add PosixZeroTime!
Add a unittest to check this works.
llvm-svn: 94178
2010-01-22 15:51:31 +00:00
Xerxes Ranby
c3fa089148
Stubs for getHostCPUFeatures API. This implements part of PR5389.
...
llvm-svn: 93913
2010-01-19 21:26:05 +00:00
Anton Korobeynikov
d7f6117539
Remove spurious semicolon.
...
Patch by Diego Iastrubni!
llvm-svn: 93450
2010-01-14 20:19:51 +00:00
Douglas Gregor
0f306eba2f
Alternative fix to make sure that the extern declarations used by
...
DynamicLibrary::SearchForAddressOfSymbol refer to declarations in the
global namespace.
llvm-svn: 92023
2009-12-23 19:12:50 +00:00
Douglas Gregor
44f2fe915f
Revert 92020 until I figure out a more portable fix
...
llvm-svn: 92021
2009-12-23 19:04:10 +00:00
Douglas Gregor
9f306d1b18
Move the extern symbol declarations outside of
...
DynamicLibrary::SearchForAddressOfSymbol and force them to have "C"
linkage.
Interestingly, GCC treats the block-scoped "extern" declarations we
previously had as if they were extern "C" declarations (or, at least,
were in the global namespace), so that GCC bug papered over this LLVM
bug. Clang and EDG get the linkage correct; this new variant seems to
work for both GCC and Clang.
llvm-svn: 92020
2009-12-23 18:56:27 +00:00
Nuno Lopes
6abe311a0f
move a few more symbols to .rodata
...
llvm-svn: 92011
2009-12-23 17:48:10 +00:00