1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

484 Commits

Author SHA1 Message Date
Stefanus Du Toit
984008e1d7 Fix choice of version of Windows callback to use to consider not only the Visual Studio version, but also the Windows SDK version.
Patch by Tareq Siraj.

llvm-svn: 70299
2009-04-28 16:37:58 +00:00
Torok Edwin
285a5fb1d5 Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:
Path.cpp:59: warning: case label value exceeds maximum value for type
magic[0] is a (signed) char, but some case values are unsigned (e.g. 0xde).
When magic[0] was 0xde, the switch has taken the default branch instead of case
0xde branch.
Apparently this was the behaviour with older versions of gcc too, but not with g++.
Now g++-4.4 behaves as gcc, and ignores unsigned case values out of range signed
range.

llvm-svn: 70038
2009-04-25 10:25:12 +00:00
Anton Korobeynikov
b53ac333d7 Silence warnings.
Patch by Jay Foad!

llvm-svn: 69679
2009-04-21 16:04:56 +00:00
Anton Korobeynikov
0a64083f49 Drop obsolete reference to __eprintf.
Patch by Jay Foad!

llvm-svn: 69678
2009-04-21 16:04:41 +00:00
Daniel Dunbar
024320d274 Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:
clang: error: unable to make temporary file: /etc/cc: can't make
  unique filename: Permission denied

instead of 

  clang: error: unable to make temporary file: /etc/cc: can't make
  unique filenamePermission denied

for example.

Also, audited the uses of MakeErrMsg to make the prefix strings
consistent (not end with newline/punctuation/space/": ").

llvm-svn: 69626
2009-04-20 20:50:13 +00:00
Mikhail Glushenkov
df9499583d Call CreateProcess with bInheritHandles = TRUE.
Makes llvmc show error messages printed by child processes when run from the
Cygwin/MSYS shell. Since ExecuteAndWait does not return until the child program
has finished execution, this change should be harmless.

llvm-svn: 69082
2009-04-14 21:31:36 +00:00
Mikhail Glushenkov
c249ce5be4 Delete trailing whitespace.
llvm-svn: 69081
2009-04-14 21:31:14 +00:00
Chris Lattner
76d47b6629 fix PR3965:SIGINT handler not restored after calling ParseAST(),
patch by Alexei Svitkine!

llvm-svn: 68929
2009-04-12 23:33:13 +00:00
Daniel Dunbar
7682ffcabb Add sys::Path::makeAbsolute().
llvm-svn: 68663
2009-04-09 00:33:08 +00:00
Chris Lattner
437755672d hopefully fix an apparent build error on windows.
llvm-svn: 68175
2009-04-01 02:03:38 +00:00
Daniel Dunbar
aec3d9857f Add llvm::sys::getHostTriple and remove
llvm::sys::getOS{Name,Version}.

Right now the implementation just derives from LLVM_HOSTTRIPLE (which
is wrong, but it doesn't look like we have a define for the target
triple). Ideally this routine would actually be able to compute the
triple for targets we care about.

llvm-svn: 68118
2009-03-31 17:30:15 +00:00
Chris Lattner
095a3938e4 fix a bug Alexei Svitkine pointed out.
llvm-svn: 67510
2009-03-23 06:46:20 +00:00
Chris Lattner
910f31715e When we restore signal handlers, restore them back to what they
were when we came around, not to their default handler.  This 
should fix PR3848

llvm-svn: 67509
2009-03-23 05:55:36 +00:00
Chris Lattner
429a82ad30 factorize signal registration, part of PR3848.
llvm-svn: 67508
2009-03-23 05:42:29 +00:00
Sebastian Redl
e4e5b1c2f2 Fix the Win32 VS2008 build:
- Make type declarations match the struct/class keyword of the definition.
 - Move AddSignalHandler into the namespace where it belongs.
 - Correctly call functions from template base.
 - Some other small changes.
With this patch, LLVM and Clang should build properly and with far less noise under VS2008.

llvm-svn: 67347
2009-03-19 23:26:52 +00:00
Chris Lattner
778f77667d add some explicit llvm:: qualifiers to the unix side, fix problems on the windows side.
llvm-svn: 66386
2009-03-08 19:13:45 +00:00
Chris Lattner
005d001719 When a crash signal is delivered do two things: remove all of our
signal handlers to prevent reentrance on unrelated things (a sigabort
where the handle bus errors) also, clear the signal mask so that the
signal doesn't infinitely reissue.  This fixes rdar://6654827 -
Crash causes clang to loop

llvm-svn: 66330
2009-03-07 08:15:47 +00:00
Chris Lattner
0743280d7a move some code to gracefully handle the case when a handler crashes.
llvm-svn: 66171
2009-03-05 18:22:14 +00:00
Chris Lattner
faf39c40d4 Add a new 'AddSignalHandler' function to Signals.h that allows
arbitrary functions to be run when a crash happens.  Delete 
RemoveDirectoryOnSignal as it is dead and has never had clients.

Change PrintStackTraceOnErrorSignal to be implemented in terms of
AddSignalHandler.

I updated the Win32 versions of these APIs, but can't test them.
If there are any problems, I'd be happy to fix them as well.

llvm-svn: 66072
2009-03-04 21:21:36 +00:00
Chris Lattner
492d973ba0 Fix main executable path name resolution on FreeBSD, patch by
Ed Schouten!

llvm-svn: 65882
2009-03-02 22:17:15 +00:00
Chris Lattner
2683c5bc9a If an executable is run through a symlink, dladdr will return the
symlink.  We really want the ultimate executable being run, not
the symlink.  This lets clang find its headers when invoked through
a symlink. rdar://6602012

llvm-svn: 65017
2009-02-19 05:34:35 +00:00
Mikhail Glushenkov
5310c3cd6e Fix warning on gcc 4.3.
"system() declared with attribute warn_unused_result."

llvm-svn: 64574
2009-02-15 03:20:32 +00:00
Mikhail Glushenkov
95811401b0 Whitespace fixes.
llvm-svn: 64573
2009-02-15 03:20:03 +00:00
Cedric Venet
48be6b5e15 Unbreak the build on win32.
Cleanup some warning.

Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.

Only tested with VS2008. hope it does not break anything. feel free to revert.

llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Julien Lerouge
37d198e8f9 Fix MingW build, patch by Kenneth Boyd!
llvm-svn: 64366
2009-02-12 07:39:10 +00:00
Dan Gohman
6a9be2e4ea Use const, to support platforms where strrchr returns a const char *.
This fixes PR3535.

llvm-svn: 64224
2009-02-10 17:56:28 +00:00
Mikhail Glushenkov
d9f64e601f Add a Sleep() function.
llvm-svn: 64101
2009-02-08 22:47:39 +00:00
Mikhail Glushenkov
ef0291beda Add Emacs hints to Alarm.inc.
Also removes some trailing whitespace and fixes one 80-column violation.

llvm-svn: 64094
2009-02-08 21:10:57 +00:00
Chris Lattner
0478798632 Fix windows build, patch by Marius Wachtler!
llvm-svn: 63325
2009-01-29 18:53:28 +00:00
Chris Lattner
d5591247d1 Fix PR3424, a static constructor ordering issue. Patch by Robert Schuster!
llvm-svn: 63269
2009-01-29 04:43:42 +00:00
Chris Lattner
da545d3918 rename methods in System/Host to be more consistent.
llvm-svn: 62776
2009-01-22 19:53:00 +00:00
Misha Brukman
71c7e40966 Removed trailing whitespace from Makefiles.
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
e2ee41d1d1 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
5e30c5b83b 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
c6f581034a ARM / Mac OS X also wants to invalidate icache after jitting.
llvm-svn: 59291
2008-11-14 02:33:17 +00:00
Oscar Fuentes
dc2008cb1a 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
e5fb2e4d84 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
0369860450 hasDisassembler should return false if disassembler isn't available.
llvm-svn: 58682
2008-11-04 06:09:38 +00:00
Anton Korobeynikov
9e3342fcdf Silence a warning
llvm-svn: 58563
2008-11-02 11:47:11 +00:00
Jim Grosbach
1de8b23129 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
8f296a3788 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
8614f628d2 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
a49386d8e7 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
c1d88c3b68 CMake: Added Host.cpp to lib/System/CMakeLists.txt.
llvm-svn: 56957
2008-10-02 17:39:29 +00:00
Daniel Dunbar
1fab10702e 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
0f25988689 Initial support for the CMake build system.
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Evan Cheng
a0459a1c5a 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
f80fc084ef AllocateRWXMemory -> AllocateRWX.
llvm-svn: 56244
2008-09-16 17:28:18 +00:00
Chris Lattner
0e03352a9f 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
fb1364b2b5 Create temp. file in current path.
llvm-svn: 53973
2008-07-24 00:35:38 +00:00