Commit Graph

1637 Commits

Author SHA1 Message Date
Eli Friedman
b0e77a228f Fix missing triple support for RTEMS target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134532 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06 20:56:26 +00:00
Chad Rosier
338398a288 By default mkstemp() creates a temporary file with mode 0600, but the mode
used for open is 0666.  Therefore, add the necessary permission bits for
consistency.
rdar://8621462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134430 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-05 18:55:31 +00:00
Duncan Sands
ba519f8fc9 Revert previous commit. It seems that whether casting to void
is valid or not depends on which system you build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134321 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 13:14:22 +00:00
Duncan Sands
d01cb35804 Supress gcc-4.5 warning about the result not being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134319 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 13:06:23 +00:00
Douglas Gregor
6ced1d12dd Add initial *-*-rtems* target, from Joel Sherrill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134282 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-01 22:41:06 +00:00
Nick Lewycky
e6240e8b83 Fix the implementation of ConstantRange::sub(ConstantRange). Patch by Xi Wang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133648 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 21:13:46 +00:00
Ted Kremenek
cf886188fb add option for literal formatting to APInt::toString()
toString() now takes an optional bool argument that,
depending on the radix, adds the appropriate prefix
to the integer's string representation that makes it into a
meaningful C literal, e.g.:

hexademical: '-f' becomes '-0xf'
octal: '77' becomes '077'
binary: '110' becomes '0b110'

Patch by nobled@dreamwidth.org!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133032 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-15 00:51:55 +00:00
Evan Cheng
ff276b40f0 Aliased flag options should be directed to stdout, not stderr to be consistent. Patch by Julien Lerouge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132931 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-13 20:45:54 +00:00
Andrew Trick
f289df2d95 Branch profiling: floating-point avoidance.
Patch by: Jakub Staszak!

Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132867 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-11 01:05:22 +00:00
Chris Lattner
78a113cbff add another sandybridge alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132772 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-09 06:38:17 +00:00
Zhongxing Xu
422b62b407 singed int causes signed extension, which contradicts the intention to pick up
integers with high 32 bits being zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 08:29:51 +00:00
Joerg Sonnenberger
dd137903e4 Add new -d option to tblgen. It writes a make(1)-style dependency file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132395 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-01 13:10:15 +00:00
John McCall
fe754ab90a ...this is not a good commit day for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132294 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-29 19:44:55 +00:00
John McCall
832a9d1a76 On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions
(which doesn't matter at all) and llvm.eh.resume calls (which does).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-29 19:39:04 +00:00
Chris Lattner
c4cb237ca6 fix a bug for hosts without round, PR8893.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131842 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 06:03:53 +00:00
Chris Lattner
9bb4a2ae8a random comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:50:53 +00:00
Andrew Trick
dc5948d472 Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131780 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 00:56:46 +00:00
Benjamin Kramer
eb274e6bdd Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131730 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 15:11:26 +00:00
Rafael Espindola
7205d431f1 Revert my previous patch. The cmake build had already been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131606 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-19 00:02:45 +00:00
Rafael Espindola
e37234739e Fix the cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131602 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 23:56:40 +00:00
Eli Friedman
49fcf571da Shuffle StandardPasses.cpp into VMCore; add it to CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131600 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 23:51:11 +00:00
Eli Friedman
10a818809d Third pass at allowing plugins to modify default passes. This time with a tweak so that we don't depend on an uninitialized argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131581 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 21:40:04 +00:00
Eli Friedman
f9a74cf069 Revert r131556; it's breaking buildbots/clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131567 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 20:39:27 +00:00
David Chisnall
b2a00dca1b Second pass at allowing plugins to modify default passes. This time without bonus inter-library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131556 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 19:00:41 +00:00
Rafael Espindola
ab078f0232 Don't include information about the build into the information returned by
getHostTriple. This fixes a 32 bit clang running on a 64 bit ubuntu.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131463 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-17 15:26:34 +00:00
Devang Patel
201e6cdc39 Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131244 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-12 21:29:42 +00:00
Devang Patel
b11f80e94b Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131238 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-12 19:06:16 +00:00
Andrew Trick
1680832a9b Typo and missing checkin from r131186.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131187 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11 16:44:08 +00:00
Andrew Trick
7c863eb8cc Bugpoint support for miscompilations that result in a crash.
This change allows bugpoint to pinpoint the "opt" pass and bitcode
segment responsible for a crash caused by miscompilation. At least it
works well for me now, without having to create any custom execution
wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131186 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11 16:31:24 +00:00
Nick Lewycky
95d206a9c7 In option typo correction, consider -foo=VALUE flags as two distinct parts. The
comments claimed it did this, but the LHS value was actually an unused variable.

The new system considers only the '-foo' part when comparing it for typos
against flags that have values, but still look at the whole string for flags
that don't. That way, we'll still correct '-inst=combine' to '-instcombine'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130685 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-02 05:24:47 +00:00
NAKAMURA Takumi
6073a05240 Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130657 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-01 13:29:49 +00:00
Douglas Gregor
72d30f6950 Include <pthread.h> before we use pthread_self/pthread_kill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130510 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-29 16:12:17 +00:00
Ted Kremenek
5d86759e0f Add MemoryBuffer::getBufferKind() to report whether a memory buffer uses malloc'ed or mmap'ed memory. This is for performance analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130432 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 20:34:18 +00:00
Lenny Maiorani
6cf081cbe5 Remove bounded StringRef::compare() since nothing but Clang SA was using it and it is just as easy to use StringRef::substr() preceding StringRef::compare() to achieve the same thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130430 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 20:20:12 +00:00
Chris Lattner
e27c3ea2bc allow adding a FoldingSetNodeID to a FastFoldingSetNode, resolving PR9499,
patch by Johannes Schaub!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130151 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-25 20:58:50 +00:00
Jay Foad
a0f5092703 Like the coding standards say, do not use "using namespace std".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130054 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 09:06:00 +00:00
Eric Christopher
f0c3af637a Add support for 64-bit object files to Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129975 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-22 03:50:19 +00:00
Devang Patel
06161fcdd6 Add DW_OP_bit_piece.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129945 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-21 22:26:13 +00:00
Daniel Dunbar
88c924c67e sys/Host: Change getHostTriple() to return the full Darwin version on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-20 15:44:33 +00:00
Justin Holewinski
e1fee48cd0 PTX: Add intrinsics to list of built-in intrinsics, which allows them to be
used by Clang.  To help Clang integration, the PTX target has been split
     into two targets: ptx32 and ptx64, depending on the desired pointer size.

- Add GCCBuiltin class to all intrinsics
- Split PTX target into ptx32 and ptx64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129851 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-20 15:37:17 +00:00
Daniel Dunbar
398a5ca9cd ADT/Triple: Drop support for -osx style triples, we are going with -macosx
instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129836 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 23:55:20 +00:00
Daniel Dunbar
1af394766f ADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Triple::OSX once Clang has moved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129833 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 23:34:12 +00:00
Daniel Dunbar
e1fe09f682 ADT/Triple: Add isOSDarwin() and isOSWindows() helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129815 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 21:12:05 +00:00
Daniel Dunbar
e8ba52d639 ADT/Triple: Fix Triple::getArchNameForAssembler to support OSX and iOS
enumeration values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129814 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 21:07:03 +00:00
Daniel Dunbar
087d6a59ad ADT/Triple: Generalize and simplify getDarwinNumber to just be getOSVersion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129799 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 20:24:34 +00:00
Daniel Dunbar
0dde4c00ee ADT/Triple: Add support for more explicit "osx" and "ios" OS names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129798 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 20:19:27 +00:00
Ted Kremenek
1da29dd3f8 Add BumpPtrAllocator::getTotalMemory() to allow clients to query how much memory a BumpPtrAllocator allocated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129727 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-18 22:44:46 +00:00
Devang Patel
e9db5e29e3 Introduce support to encode Objective-C property information in debugging information generated for an interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-16 00:11:51 +00:00
Lenny Maiorani
437ef0cfb7 Implements StringRef::compare with bounds. It is behaves similarly to strncmp(). Unit tests also included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129582 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 17:56:50 +00:00
Chris Lattner
7a2bdde0a0 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 05:18:47 +00:00