Douglas Gregor
1051937c21
Add llvm::Program::ChangeStderrToBinary().
...
llvm-svn: 94743
2010-01-28 06:42:08 +00:00
Chris Lattner
dec86d7337
mark some libraries that currently require RTTI.
...
llvm-svn: 94377
2010-01-24 20:22:08 +00:00
Torok Edwin
fbcd2c76d5
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
17dc3a0a94
Stubs for getHostCPUFeatures API. This implements part of PR5389.
...
llvm-svn: 93913
2010-01-19 21:26:05 +00:00
Anton Korobeynikov
105682dc96
Remove spurious semicolon.
...
Patch by Diego Iastrubni!
llvm-svn: 93450
2010-01-14 20:19:51 +00:00
Douglas Gregor
f94e00d869
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
051b92c3cd
Revert 92020 until I figure out a more portable fix
...
llvm-svn: 92021
2009-12-23 19:04:10 +00:00
Douglas Gregor
93254e1ffb
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
129819de71
move a few more symbols to .rodata
...
llvm-svn: 92011
2009-12-23 17:48:10 +00:00
Daniel Dunbar
cf7744e44d
Fix Win32 Path.inc for API update.
...
llvm-svn: 91706
2009-12-18 19:59:48 +00:00
Jeffrey Yasskin
5908f1e27b
Make Path use StringRef instead of std::string where possible.
...
llvm-svn: 91620
2009-12-17 21:02:39 +00:00
Chris Lattner
a6fc9de9fc
remove use of SmallVector from Path::makeUnique. Path::makeUnique
...
is not used by anything performance sensitive, so just use std::string.
llvm-svn: 91528
2009-12-16 08:40:44 +00:00
Chris Lattner
e6be85661d
eliminate an extraneous use of SmallVector in a case where
...
a fixed size buffer is perfectly fine.
llvm-svn: 91527
2009-12-16 08:35:54 +00:00
Torok Edwin
022336adf7
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.).
llvm-svn: 91276
2009-12-14 12:38:18 +00:00
Torok Edwin
abdc1c274b
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.
llvm-svn: 91240
2009-12-13 08:59:40 +00:00
Torok Edwin
5c9429fa47
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.
llvm-svn: 91217
2009-12-12 12:42:31 +00:00
Daniel Dunbar
5ea6200d06
Remove spurious extern.
...
llvm-svn: 90937
2009-12-09 03:26:33 +00:00
Oscar Fuentes
8b6d88d2f8
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!
llvm-svn: 90748
2009-12-07 05:29:59 +00:00
Benjamin Kramer
8cb52c266f
Remove dead returns.
...
llvm-svn: 90083
2009-11-29 17:42:58 +00:00
Kovarththanan Rajaratnam
4b9f0b6720
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.
llvm-svn: 90082
2009-11-29 17:19:48 +00:00
Edward O'Callaghan
746782dde5
API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards to comments from 89765 post review.
...
llvm-svn: 89848
2009-11-25 06:32:19 +00:00
Daniel Dunbar
7402c472c3
Remove bogus error handling code.
...
llvm-svn: 89786
2009-11-24 19:03:33 +00:00
Edward O'Callaghan
dddf134a3c
Provide Path::isSpecialFile interface for PR5568.
...
llvm-svn: 89765
2009-11-24 15:19:10 +00:00
Oscar Fuentes
36dd7d5f5c
Use CMAKE_DL_LIBS instead of raw library name. Fixes bug 5536.
...
Patch by Tobias Grosser!
llvm-svn: 89406
2009-11-19 23:21:43 +00:00
Benjamin Kramer
3846506466
Unbreak x64 MSVC build. Patch by Nicolas Capens!
...
llvm-svn: 89341
2009-11-19 12:17:31 +00:00
Benjamin Kramer
713fd3564a
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.
llvm-svn: 89111
2009-11-17 17:57:04 +00:00
Daniel Dunbar
18f845fccd
Remove bogus corei7 and atom entries, the family was incorrect.
...
llvm-svn: 88818
2009-11-14 22:04:42 +00:00
Daniel Dunbar
397235f11c
Fill out X86 table, although we are missing lots of names for things. We now
...
properly detect my Xeon box though.
llvm-svn: 88814
2009-11-14 21:36:19 +00:00
Daniel Dunbar
241d01b590
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!
llvm-svn: 88768
2009-11-14 10:09:12 +00:00
Duncan Sands
fec62f0ef5
Revert commit 81144, and add a comment. It caused bugpoint timeouts
...
not to work any more on linux.
llvm-svn: 86481
2009-11-08 20:55:48 +00:00
Benjamin Kramer
9470ecdb2c
Path::createDirectoryOnDisk should ignore existing directories on win32 too.
...
llvm-svn: 86132
2009-11-05 14:32:40 +00:00
Edward O'Callaghan
2c7457c0f1
Fix malloc.h is deprecated warning on DragonFly BSD.
...
llvm-svn: 85782
2009-11-02 03:20:57 +00:00
Dan Gohman
b0cad70c24
Most stack straces don't need 3 digits worth of levels.
...
llvm-svn: 85575
2009-10-30 02:45:10 +00:00
Chandler Carruth
56869f22c4
Move DataTypes.h to include/llvm/System, update all users. This breaks the last
...
direct inclusion edge from System to Support.
llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Chandler Carruth
083524ae5c
Remove unused includes.
...
llvm-svn: 85074
2009-10-25 22:38:41 +00:00
Ted Kremenek
b5cd6233b1
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.
llvm-svn: 84903
2009-10-22 22:16:17 +00:00
Edward O'Callaghan
8227b0512f
Haiku porting patches, Credit to Paul Davey.
...
llvm-svn: 83823
2009-10-12 04:57:20 +00:00
Benjamin Kramer
f01ee30328
MingW build fixes
...
- MingW needs -lpsapi (in ${LIBS}) linked after -lLLVMSystem.
Noticed by Ronald Pijnacker!
- Some parts of the System library must be build with exceptions on windows.
Based on a patch by Jay Foad!
llvm-svn: 83251
2009-10-02 19:36:31 +00:00
Daniel Dunbar
b2942cb5cb
... missed hiding a variable for MSVC only.
...
llvm-svn: 82552
2009-09-22 16:10:35 +00:00
Daniel Dunbar
1bdedd3876
Hide MSVC specific CRT interaction behind _MSC_VER.
...
llvm-svn: 82551
2009-09-22 15:58:35 +00:00
Mikhail Glushenkov
88e98fec70
Remove the GetProcessId() call from Win32/Program.inc, take 2.
...
GetProcessId() was introduced only in Windows XP, and we want to support earlier
versions.
llvm-svn: 82548
2009-09-22 15:40:32 +00:00
Daniel Dunbar
4c7b0ca05b
Add a magic LLVM_DISABLE_CRT_DEBUG environment variable which we check in RegisterHandler and use to disable the Win32 crash dialogs. These are a major blocker to any kind of automated testing.
...
Also, tweak the 'lit' test runner to set this variable unconditionally.
llvm-svn: 82537
2009-09-22 09:50:28 +00:00
Daniel Dunbar
7b446a001d
Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaks
...
ExecuteAndWait.
llvm-svn: 82522
2009-09-22 04:44:56 +00:00
Mikhail Glushenkov
0adf07eb9e
Get rid of GetProcessId in Win32/Program.inc.
...
GetProcessId was introduced only in XP. As a bonus, this change makes Program
objects copyable, since Program is now basically a PID.
llvm-svn: 81826
2009-09-15 03:39:45 +00:00
Daniel Dunbar
a22637897a
Experimental fix for PR4960.
...
- Could we just always implement this as __clear_cache for __GNUC__?
llvm-svn: 81655
2009-09-12 23:29:02 +00:00
Dan Gohman
e592923603
Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
...
working. To support this, add an is_displayed() function to raw_ostream,
and generalize Process::StandardOutIsDisplayed and friends in order to
support it.
Also, call RemoveFileOnSignal before creating a file instead of after, so
that the file isn't left behind if the program is interrupted between when
the file is created and RemoveFileOnSignal is called.
While here, add a -S to llvm-extract and port it to IRReader so that it
supports assembly input.
llvm-svn: 81568
2009-09-11 20:46:33 +00:00
Benjamin Kramer
2a1131a42f
Add a shortcut for OS X to Path::GetMainExecutable. This gives a nice speedup on
...
clang's testsuite.
llvm-svn: 81333
2009-09-09 12:09:08 +00:00
Mikhail Glushenkov
d2f8a111cd
Check that the 'kill' call succeeded.
...
Thanks to Duncan Sands for spotting this.
llvm-svn: 81328
2009-09-09 09:51:47 +00:00
Mikhail Glushenkov
a3fbf36004
This should unbreak the build on 64-bit Linux.
...
llvm-svn: 81252
2009-09-08 20:31:27 +00:00
Mikhail Glushenkov
29b5d3012b
Const-correctness.
...
llvm-svn: 81249
2009-09-08 19:51:39 +00:00