Misha Brukman
5cbf223916
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
35e2cfccaf
Don't use plain %x to print pointer values. I had changed it from %p
...
since %p isn't formatted consistently, but obviously plain %x is wrong.
PRIxPTR with a cast to uintptr_t would work here, but that requires
inconvenient build-system changes. %lu works on all current and
foreseable future hosts.
llvm-svn: 60616
2008-12-05 23:39:24 +00:00
Dan Gohman
7f079aabed
Demangle and pretty-print symbols in internal backtraces. Patch by
...
Wesley Peck, with a few fixes by me.
llvm-svn: 60605
2008-12-05 20:12:48 +00:00
Evan Cheng
889b79bb86
ARM / Mac OS X also wants to invalidate icache after jitting.
...
llvm-svn: 59291
2008-11-14 02:33:17 +00:00
Oscar Fuentes
0c6b786ab2
CMake: when bulding shared libraries on non-WIN32 systems, link dl to
...
LLVMSystem.
llvm-svn: 59159
2008-11-12 20:40:56 +00:00
Nuno Lopes
2817338558
plug leakage of mutex data. pthread_mutex_destroy() doesnt free our malloc'ed memory.
...
llvm-svn: 58805
2008-11-06 16:21:49 +00:00
Evan Cheng
c1d10e6b42
hasDisassembler should return false if disassembler isn't available.
...
llvm-svn: 58682
2008-11-04 06:09:38 +00:00
Anton Korobeynikov
1db1b64e6e
Silence a warning
...
llvm-svn: 58563
2008-11-02 11:47:11 +00:00
Jim Grosbach
9396051e3d
Update the stub and callback code to handle lazy compilation. The stub
...
is re-written by the callback to branch directly to the compiled code
in future invocations.
Added back in range-based memory permission functions for the updating of
the stub on Darwin.
llvm-svn: 57846
2008-10-20 21:39:23 +00:00
Duncan Sands
26ff6f9c54
Add <cstdio> include where needed by gcc-4.4.
...
Patch by Samuel Tardieu.
llvm-svn: 57291
2008-10-08 07:23:46 +00:00
Argyrios Kyrtzidis
a6f9bb7905
Add implementations for sys::Memory::setWritable and sys::Memory::setExecutable on Win32 platform.
...
llvm-svn: 57047
2008-10-04 08:15:32 +00:00
Jim Grosbach
b22ef71d46
On Darwin ARM, memory needs special handling to do JIT. This patch expands
...
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..
llvm-svn: 57013
2008-10-03 16:17:20 +00:00
Oscar Fuentes
e3c43d6279
CMake: Added Host.cpp to lib/System/CMakeLists.txt.
...
llvm-svn: 56957
2008-10-02 17:39:29 +00:00
Daniel Dunbar
e52e6bfd29
Add llvm::sys::{osName,osVersion} for retrieving operating system name
...
& version as strings.
- Win32 code is untested.
llvm-svn: 56942
2008-10-02 01:17:28 +00:00
Oscar Fuentes
a229b3c9a7
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Evan Cheng
5cc53c34c3
Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.
...
llvm-svn: 56303
2008-09-18 07:54:21 +00:00
Evan Cheng
7c5dbd95e2
AllocateRWXMemory -> AllocateRWX.
...
llvm-svn: 56244
2008-09-16 17:28:18 +00:00
Chris Lattner
b56e07e736
add a helper method to sys::Path for clang, patch by
...
Kovarththanan Rajaratnam!
llvm-svn: 54655
2008-08-11 23:39:47 +00:00
Devang Patel
cbfc1a4737
Create temp. file in current path.
...
llvm-svn: 53973
2008-07-24 00:35:38 +00:00
Devang Patel
c5552c44a0
While creating temp. file on disk, if the current filename points to a existing directory then create new temp. file inside the directory.
...
llvm-svn: 53929
2008-07-22 20:02:39 +00:00
Devang Patel
bd06440440
Handle bitcode wrappers.
...
llvm-svn: 53924
2008-07-22 18:00:36 +00:00
Chris Lattner
2e24e0ca68
open plugins with RTLD_GLOBAL, pointed out by Bram Adams.
...
llvm-svn: 53385
2008-07-10 00:52:20 +00:00
Chris Lattner
a660f4bb07
Add a little wrapper header that is put around bc files when emitting
...
bc files for modules with a target triple that indicates they are for
darwin. The reader unconditionally handles this, and the writer could
turn this on for more targets if we care.
This change has two benefits for darwin:
1) it allows us to encode the cpu type of the file in an easy to read
place that doesn't require decoding the bc file.
2) it works around a bug (IMO) in darwin's AR where it is incapable of
handling files that are not a multiple of 8 bytes long. BC files
are only guaranteed to be multiples of 4 bytes long.
llvm-svn: 53275
2008-07-09 05:14:23 +00:00
Seo Sanghyeon
8f7291387f
Fix GetMainExecutable. Patch by Sam Bishop.
...
llvm-svn: 52847
2008-06-27 22:55:30 +00:00
Matthijs Kooijman
f61fd54237
Make LLVM compile on DragonFly BSD (PR2499).
...
Patch by Hasso Tepper!
llvm-svn: 52781
2008-06-26 10:36:58 +00:00
Bill Wendling
3fdca23ee1
Cleanup for unitialized types. Patch by Jean-Daniel Dupas!
...
llvm-svn: 52775
2008-06-26 08:32:05 +00:00
Chris Lattner
d4741e803f
"An improved Mach-O file type detection for sys::IdentifyFileType()
...
This patch add supports for single architecture mach-o files (the current implementation only support Universal Binary), and solve the signature conflict between java class and Universal Binary magics.
Note that this function will always returned dynamic library for Universal Binaries (like the current implementation) because the binary type is not include in the file header."
Patch by Jean-Daniel Dupas!
llvm-svn: 52766
2008-06-26 05:17:18 +00:00
Chris Lattner
b4325a8316
fix compilation errors in my previous patch
...
llvm-svn: 52733
2008-06-25 17:17:53 +00:00
Chris Lattner
881d537d2c
Add a new InvalidateInstructionCache method to sys::Memory.
...
llvm-svn: 52731
2008-06-25 17:14:10 +00:00
Dan Gohman
1cf5af9e42
Use static_cast instead of reinterpret_cast for casting void*.
...
llvm-svn: 52592
2008-06-21 20:17:03 +00:00
Argyrios Kyrtzidis
06f0d441f7
Minor comment fix.
...
llvm-svn: 52312
2008-06-16 10:14:09 +00:00
Wojciech Matyjewicz
c6a6618e6a
Add a missing semicolon.
...
llvm-svn: 52290
2008-06-15 18:02:47 +00:00
Argyrios Kyrtzidis
2cc0abf260
Fix the sys::Path::getSuffix() implementation.
...
llvm-svn: 52288
2008-06-15 15:15:19 +00:00
Argyrios Kyrtzidis
24f99985b8
Fix the environment block that is passed to the CreateProcess function.
...
This bug made llvm-ld unable to function with "-native" option, since the process that was used to call 'gcc' was crashing.
llvm-svn: 52284
2008-06-15 03:54:39 +00:00
Matthijs Kooijman
1cc695efd7
Fix redirection of stderr in sys::Program::ExecuteAndWait. There was logic
...
error that caused it to redirect stderr to stdout too often.
This fix is applied identically to the win32 code as well, but that is
untested.
--Thi line, and those below, will be ignored--
M System/Unix/Program.inc
M System/Win32/Program.inc
llvm-svn: 52233
2008-06-12 12:53:35 +00:00
Matthijs Kooijman
616e484be4
Make I/O redirection handling in sys::Program a bit more consistent. No
...
functional changes. Win32 code is untested, but should work fine.
In the unix variant, rename RedirectFD to RedirectIO and let that function
handle empty and null paths instead of doing that in the caller 3 times. This
is the same as win32 already does it.
In the win32 variant, use Path::isEmpty() instead of checking the resulting
c_str() manually. This is the same as unix already does it.
llvm-svn: 52230
2008-06-12 10:47:18 +00:00
Anton Korobeynikov
5e8644071d
Provide hooks for libgcc symbols' address resolution inside lli on mingw32.
...
Patch by Julien Lerouge!
llvm-svn: 52037
2008-06-06 07:20:07 +00:00
Bill Wendling
9cfdac50f1
Unbreak build.
...
llvm-svn: 51709
2008-05-29 22:02:08 +00:00
Bill Wendling
33e396d041
Remove more iostream header includes. Needed to implement a "FlushStream"
...
function to flush a specified std::ostream.
llvm-svn: 51705
2008-05-29 21:46:33 +00:00
Bill Wendling
89c2e3babb
Follow-up to the reverting of r51218. This puts the checks out-of-line. Because
...
they aren't in the header file, systems with a <string> header file that isn't
64-bit clean shouldn't warn if #including Path.h and specifying
-Wshorten-64-to-32.
llvm-svn: 51393
2008-05-21 21:20:07 +00:00
Dan Gohman
4e974ab933
Make PreVerifyID, IntSigsEnd, and KillSigsEnd const.
...
llvm-svn: 51088
2008-05-14 00:42:30 +00:00
Dan Gohman
d78c400b5b
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Nick Lewycky
c38c1712f7
Make constructors target-specific. This fixes problems where the path would
...
include backslashes on Windows. This should fix llvm-ld problems on win32.
llvm-svn: 50960
2008-05-11 17:37:40 +00:00
Nick Lewycky
25f08069ae
Fix renamePathOnDisk on Win32, patch from David Leon. This fixes problems with
...
llvm-ar being unable to rename files.
llvm-svn: 50702
2008-05-06 03:42:21 +00:00
Dan Gohman
a8b7e78f54
Remove uses of llvm/System/IncludeFile.h that are no longer needed.
...
llvm-svn: 50695
2008-05-06 01:32:53 +00:00
Evan Cheng
86cb31862f
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Nate Begeman
4840515dff
Restore code to disable crash catcher on older OS X systems
...
llvm-svn: 49568
2008-04-12 00:47:46 +00:00
Dan Gohman
f4bc782495
Make several symbols static.
...
llvm-svn: 49496
2008-04-10 21:11:47 +00:00
Ted Kremenek
a518bb79b1
Make getDirnameSep a static method (not part of Path's interface).
...
llvm-svn: 49354
2008-04-07 22:01:32 +00:00
Ted Kremenek
c042bf1db5
Added method Path::getDirname().
...
llvm-svn: 49352
2008-04-07 21:53:57 +00:00