Commit Graph

647 Commits

Author SHA1 Message Date
Chris Lattner
21aa347c28 add minix support, patch by Kees van Reeuwijk! PR6797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 20:45:04 +00:00
Torok Edwin
61633368cf AddSignalHandler was not releasing the critical section on win32.
Patch from Gianluigi Tiesi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-31 12:07:16 +00:00
Dan Gohman
4bb31bfaa3 Fix a grammaro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 20:04:57 +00:00
Anton Korobeynikov
81244298ea 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-28 15:07:02 +00:00
Chris Lattner
f35d88f439 remove a constructor implementation that isn't declared
in the header.  How can both clang and gcc accept this?

PR6703


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99658 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 22:17:24 +00:00
Jeffrey Yasskin
b7ccf75de5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98716 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 07:08:12 +00:00
Jeffrey Yasskin
f28411f732 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 04:57:55 +00:00
Chris Lattner
cdff5f7787 don't forget to close a FD on an error condition, found by
cppcheck, PR6617.  Patch by Ettl Martin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-14 23:16:45 +00:00
Kovarththanan Rajaratnam
16ceb3aaf7 Remove superfluous NULL assignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 14:17:24 +00:00
Ted Kremenek
41b39e9908 Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98250 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 07:51:23 +00:00
Jeffrey Yasskin
6220754525 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().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98243 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-11 06:14:32 +00:00
Chris Lattner
782ab584e5 follow-on to PR6280
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14 18:20:09 +00:00
Chris Lattner
6ae7bbb5ea improve support for minix, PR6280, patch by
Kees van Reeuwijk!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12 00:37:46 +00:00
Douglas Gregor
21569cddc1 Add llvm::Program::ChangeStderrToBinary().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94743 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 06:42:08 +00:00
Chris Lattner
c0f8a361f5 mark some libraries that currently require RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:22:08 +00:00
Torok Edwin
b0a5baefaa 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 15:51:31 +00:00
Xerxes Ranby
1c8183df7f Stubs for getHostCPUFeatures API. This implements part of PR5389.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93913 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 21:26:05 +00:00
Anton Korobeynikov
f4b6d88cda Remove spurious semicolon.
Patch by Diego Iastrubni!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 20:19:51 +00:00
Douglas Gregor
37b7baec0d Alternative fix to make sure that the extern declarations used by
DynamicLibrary::SearchForAddressOfSymbol refer to declarations in the
global namespace.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 19:12:50 +00:00
Douglas Gregor
0b64472737 Revert 92020 until I figure out a more portable fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92021 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 19:04:10 +00:00
Douglas Gregor
0f706ab789 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 18:56:27 +00:00
Nuno Lopes
ec9d8b0047 move a few more symbols to .rodata
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 17:48:10 +00:00
Daniel Dunbar
1edcafe10f Fix Win32 Path.inc for API update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18 19:59:48 +00:00
Jeffrey Yasskin
88cd3582b6 Make Path use StringRef instead of std::string where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-17 21:02:39 +00:00
Chris Lattner
dc5138d81f remove use of SmallVector from Path::makeUnique. Path::makeUnique
is not used by anything performance sensitive, so just use std::string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:40:44 +00:00
Chris Lattner
e4b0cd2856 eliminate an extraneous use of SmallVector in a case where
a fixed size buffer is perfectly fine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:35:54 +00:00
Torok Edwin
546d8d0e3e Add "generic" fallback.
gcc warned that the function may not have a return value, indeed
for non-intel and non-amd X86 CPUs it is right (VIA, etc.).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-14 12:38:18 +00:00
Torok Edwin
c4174d675b Using _MSC_VER there was wrong, better just use the already existing ifdefs for
x86 CPU detection for the X86 getHostCPUName too, and create a simple
getHostCPUName that returns "generic" for all else.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-13 08:59:40 +00:00
Torok Edwin
da8bafbf83 Enable CPU detection when using MS VS 2k8 too.
MSVS2k8 doesn't define __i386__, hence all the CPU detection code was disabled.
Enable it by looking for _MSC_VER.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91217 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-12 12:42:31 +00:00
Daniel Dunbar
164c7ba0ef Remove spurious extern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-09 03:26:33 +00:00
Oscar Fuentes
bcc2e45840 Fixes the Atomic implementation if compiled by MSVC compiler.
sys::cas_flag should be long on this platform, InterlockedAdd() is
defined only for the Itanium architecture (according to MSDN).

Patch by Michael Beck!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 05:29:59 +00:00
Benjamin Kramer
18eaefd25e Remove dead returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 17:42:58 +00:00
Kovarththanan Rajaratnam
d614673bb8 This patch ensures that Path::GetMainExecutable is able to handle the
case where realpath() fails. When this occurs we segfault trying to
create a std::string from a NULL pointer.

Fixes PR5635.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 17:19:48 +00:00
Edward O'Callaghan
e49a8e4db9 API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards to comments from 89765 post review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 06:32:19 +00:00
Daniel Dunbar
98e46d81c4 Remove bogus error handling code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 19:03:33 +00:00
Edward O'Callaghan
d41e944501 Provide Path::isSpecialFile interface for PR5568.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 15:19:10 +00:00
Oscar Fuentes
470fb51961 Use CMAKE_DL_LIBS instead of raw library name. Fixes bug 5536.
Patch by Tobias Grosser!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 23:21:43 +00:00
Benjamin Kramer
ac07b3df3e Unbreak x64 MSVC build. Patch by Nicolas Capens!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89341 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 12:17:31 +00:00
Benjamin Kramer
110e7bb25c Revert CPU detection code to return "generic" instead of an empty string in case
of failure. The x86 target didn't like empty cpu names and broke x86 tests on
non-x86 buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 17:57:04 +00:00
Daniel Dunbar
bfa0929583 Remove bogus corei7 and atom entries, the family was incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88818 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 22:04:42 +00:00
Daniel Dunbar
a7ac3cee8f Fill out X86 table, although we are missing lots of names for things. We now
properly detect my Xeon box though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88814 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 21:36:19 +00:00
Daniel Dunbar
067d024b05 Add llvm::sys::getHostCPUName, for detecting the LLVM name for the host CPU.
- This is an initial step towards -march=native support in Clang, and towards
   eliminating host dependencies in the targets. See PR5389.

 - Patch by Roman Divacky!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 10:09:12 +00:00
Duncan Sands
68d29d09c6 Revert commit 81144, and add a comment. It caused bugpoint timeouts
not to work any more on linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 20:55:48 +00:00
Benjamin Kramer
e9684c682a Path::createDirectoryOnDisk should ignore existing directories on win32 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 14:32:40 +00:00
Edward O'Callaghan
bd5dc45296 Fix malloc.h is deprecated warning on DragonFly BSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85782 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-02 03:20:57 +00:00
Dan Gohman
0b81e19d19 Most stack straces don't need 3 digits worth of levels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 02:45:10 +00:00
Chandler Carruth
8b67f774e9 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 01:35:46 +00:00
Chandler Carruth
18ad485bf5 Remove unused includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85074 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-25 22:38:41 +00:00
Ted Kremenek
8201ebd40b Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context.
This address: PR 5277 (Program::Wait is unsafe to call from multiple threads).

Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into
another solution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84903 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22 22:16:17 +00:00
Edward O'Callaghan
df40664a63 Haiku porting patches, Credit to Paul Davey.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 04:57:20 +00:00