Commit Graph

297 Commits

Author SHA1 Message Date
Dan Gohman
e3c65d1ede Relax this check to silently swallow FE_INEXACT, following directions
from rdar://8452472. This unbreaks gcc.dg/builtins-17.c.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114368 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-20 22:32:25 +00:00
Dan Gohman
3f2f21e640 Attempt to support platforms which don't have fenv.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17 20:06:27 +00:00
Michael J. Spencer
8a26f81889 System/Path: Add isObjectFile().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15 22:45:45 +00:00
Dan Gohman
df782a789d Remove obsolete comments about throwing exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-02 22:14:51 +00:00
Dan Gohman
040bbcc876 Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112836 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-02 17:35:10 +00:00
Dan Gohman
41154114f6 Add an interface for unregistering a file from the FilesToRemove list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 14:17:34 +00:00
Michael J. Spencer
a805b2ded8 Fix spelling/typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-31 06:36:22 +00:00
Owen Anderson
826c148aa5 Add an erase() method to llvm::ThreadLocal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 22:49:43 +00:00
Owen Anderson
e850e6e162 Add more doxygen comments for llvm::ThreadLocal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109683 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 22:30:53 +00:00
Chris Lattner
a6c04ee4c8 Path::isRootDirectory is unimplemented on Unix and not used,
remove it, fixing PR6909.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 04:39:07 +00:00
Oscar Fuentes
f14e9569ff DataTypes.h.cmake (MSVC): Protect some #define's and use specific
suffixes for integer types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106797 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24 22:05:52 +00:00
Daniel Dunbar
fb89e08413 Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanup
stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103333 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 02:10:34 +00:00
Nick Lewycky
28edeb765b Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102599 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29 05:54:29 +00:00
Torok Edwin
b4bc96317a Fix use-of-uninitialized value when RWX memory can't be allocated (PR6701).
SELinux doesn't allow 'execmem', returning MAP_FAILED and 'Permission denied'
for mmap or RWX memory. In this case AllocateRWX was returning a MemoryBlock
with uninitialized fields, which sometimes caused crashes.

This patch initializes MemoryBlock fields to 0, so that the RWX-failure check
works.
It doesn't fix the SELinux 'execmem' issues though (the JIT will not work when
SELinux is in enforcing mode).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99762 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-28 11:07:36 +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
Dan Gohman
fb76fe0929 Fix various doxygen warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-22 04:10:52 +00:00
Dan Gohman
f451cb870e Fix "the the" and similar typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 16:03:48 +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
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
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
Oscar Fuentes
e019be7d4b Removed VC++ compatibility code from DataTypes.h.in.
This header file is not used on VC++ builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90829 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:49:54 +00:00
Oscar Fuentes
350dd4a6a6 For VC++, define the ?INT*_C macros only it they are not yet defined.
Some compatibility updates like the Boost TR1 compatibility headers
define them.

Patch contributed by OvermindDL1!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-08 02:40:09 +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
Edward O'Callaghan
5b512fe527 Adjust comments to new semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89862 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 12:00:34 +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
Edward O'Callaghan
3d8f87969b Fix comments as pre-post review for rev.89765.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89770 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-24 16:29:23 +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
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
Mikhail Glushenkov
4e2211112e 80-col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 06:33:01 +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
Nick Lewycky
706945764a Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 18:53:09 +00:00
Nick Lewycky
2bc6b9acd6 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 18:47:33 +00:00
Daniel Dunbar
57d6903dea Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaks
ExecuteAndWait.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 04:44:56 +00:00
Mikhail Glushenkov
6db0e3a981 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15 03:39:45 +00:00
Dan Gohman
ec080467f5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81568 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11 20:46:33 +00:00
Mikhail Glushenkov
581af5f10a Copy-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81331 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 10:14:55 +00:00
Mikhail Glushenkov
4f51d99ca5 Revert 81248 for now.
Program objects have ownership semantics on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81329 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 09:52:04 +00:00
Mikhail Glushenkov
c22675b542 Const-correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81249 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 19:51:39 +00:00
Mikhail Glushenkov
40e9b8e670 Since Program is basically a PID, it should be copyable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 19:51:12 +00:00
Mikhail Glushenkov
edf8e48c21 Get rid of the Pid_ member in the Program class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 19:50:55 +00:00
Mikhail Glushenkov
a607202a68 Add a Kill() function to the Program class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 19:50:27 +00:00
Duncan Sands
740eb5323e Tweak code into an equivalent form for which icc
doesn't warn about unreachable instructions.  Patch
by Erick Tryzelaar (#111).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 10:53:22 +00:00
Chris Lattner
74382b7c69 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 22:45:37 +00:00
Dan Gohman
a9ad04191c This void is implicit in C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 22:10:57 +00:00
Benjamin Kramer
f221c0bd0d Revert 78662 to fix broken windows build. Add a comment which explains the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 16:41:22 +00:00
Dan Gohman
3c8178e625 Remove an unnecessary mutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78662 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 15:03:52 +00:00
Daniel Dunbar
defc85327a Fix a race condition in getting the process exit code on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 05:02:46 +00:00
Mikhail Glushenkov
7ea9de78ee Add a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 22:24:20 +00:00
Reid Kleckner
10b4fc552f Re-committing r76828 with the JIT memory manager changes now that the build
bots like the BumpPtrAllocator changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 21:46:56 +00:00
Reid Kleckner
4bf370698a Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:40:54 +00:00