Commit Graph

2037 Commits

Author SHA1 Message Date
Eli Bendersky
6b731486d4 Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.

Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.

Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].

For more details, see:

* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28 19:00:02 +00:00
Sean Silva
525398e137 Allow using MemoryBuffers with yaml::Stream directly.
The rationale is to get YAML filenames in diagnostics from
yaml::Stream::printError -- currently the filename is hard-coded as
"YAML" because there's no buffer information available.

Patch by Kim Gräsman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168341 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-19 23:21:47 +00:00
Chris Lattner
79dcd43600 move irrelevant attribution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168182 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 18:58:23 +00:00
Daniel Dunbar
71e5ea8860 PathV2: Fix a possible infinite loop.
- The code could infinite loop trying to create unique files, if the directory
   containing the unique file exists, but open() calls on non-existent files in
   the path return ENOENT. This is true on the /dev/fd filesystem, for example.

 - Will add a clang side test case for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168081 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15 20:24:52 +00:00
Guy Benyei
ac39a03535 Add support for SPIR64 target - the 64bit counterpart of SPIR.
The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-15 10:35:47 +00:00
Eric Christopher
06b423452c Remove the CellSPU port.
Approved by Chris Lattner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167984 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 22:09:20 +00:00
Chad Rosier
fc298c76c7 Revert 167755/167760. We don't want to emit crash diagnostics on command-line syntax errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167849 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-13 16:42:19 +00:00
Chad Rosier
f4e3309e84 Revert r167620; this can be implemented using an existing CL option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167755 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-12 21:32:44 +00:00
Benjamin Kramer
6b370e615c Drop the limitation to IEEE floating point types from the fdiv of pow2 -> fmul transform.
This is safe for x87 long doubles and ppc double doubles too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167582 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-08 13:58:10 +00:00
Daniel Dunbar
64afe13a20 MemoryBuffer: Windows doesn't define S_IFIFO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167467 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 17:08:09 +00:00
Daniel Dunbar
7895353b75 MemoryBuffer: Support reading named pipes in getFile().
- We only support this when the client didn't claim to know the file size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167407 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-05 21:55:40 +00:00
Rafael Espindola
986f29c7ba XLC supports the same atomic functions as GCC, use them.
Patch by Kai.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167309 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02 20:54:45 +00:00
Michael J. Spencer
08e712b9ff [Support] Fix StrError on Windows to actually return the error string...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167191 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01 00:34:09 +00:00
Rafael Espindola
6d42bbfe5e Remove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167157 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-31 18:52:25 +00:00
James Molloy
552e731601 Add support for Cortex-A15 host recognition.
No testcase, as this is only testable on a C-A15 board.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-31 09:07:37 +00:00
Ulrich Weigand
159c735f7b APFloat cleanup: Remove now unused "arithmeticOK" logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166954 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 18:18:44 +00:00
Ulrich Weigand
fce241d76f APFloat cleanup: Remove now unused fields "sign2" and "exponent2".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166952 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 18:17:42 +00:00
Ulrich Weigand
69c9c8c4cf Implement arithmetic on APFloat with PPCDoubleDouble semantics by
treating it as if it were an IEEE floating-point type with 106-bit
mantissa.

This makes compile-time arithmetic on "long double" for PowerPC
in clang (in particular parsing of floating point constants)
work, and fixes all "long double" related failures in the test
suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166951 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29 18:09:01 +00:00
Joerg Sonnenberger
475832cc0f Don't explicitly require RTTI and EH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166772 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 12:15:29 +00:00
Daniel Dunbar
81e35ff722 Support: Don't remove special files on signals.
- Similar to Path::eraseFromDisk(), we don't want LLVM to remove things like
   /dev/null, even if it has the permission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166105 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-17 16:30:54 +00:00
Duncan Sands
2e522d0527 Add powerpc-ibm-aix to Triple. Patch by Kai.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165792 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-12 11:08:57 +00:00
Sean Silva
d2139c4e7a Revert r165652: "Remove unnecessary RTTI from the build."
... Apparently the RTTI is still necessary for some reason.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165654 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 20:50:36 +00:00
Sean Silva
ef31271dc8 Remove unnecessary RTTI from the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165652 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-10 20:27:20 +00:00
Rafael Espindola
b4e971f376 Enable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165535 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09 19:52:10 +00:00
Nick Kledzik
6e033d6dcd Improve overflow detection in StringRef::getAsUnsignedInteger().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165038 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02 20:01:48 +00:00
Andrew Kaylor
7bbd6e366b Support for generating ELF objects on Windows.
This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present.  This patch also enables MCJIT tests on Windows using the new environment value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165030 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02 18:38:34 +00:00
Micah Villmow
e53d6051b7 Add in support for SPIR to LLVM core. This adds a new target and two new calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164948 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-01 17:01:31 +00:00
Dmitri Gribenko
04cb564c8d Replace the use of strncpy() and sprintf() with std::string and LLVM streams.
Patch by Martinez, Javier E.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164822 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-28 14:15:28 +00:00
Benjamin Kramer
53347ed2f8 Make backtraces work again with both the configure and cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164817 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-28 10:10:46 +00:00
Sylvestre Ledru
94c22716d6 Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-27 10:14:43 +00:00
Sylvestre Ledru
7e2c793a2b Fix a typo 'iff' => 'if'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-27 09:59:43 +00:00
Benjamin Kramer
4335e3495d Add support for detecting some corei7-class Xeons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164714 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26 18:21:47 +00:00
Benjamin Kramer
696e06e453 YAMLParser: Fix invalid reads when encountering incorrectly quoted scalar.
Fixes PR12632.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164701 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26 15:52:15 +00:00
Benjamin Kramer
3e7735fe1c APFloat::roundToIntegral: Special values don't keep the exponent value up to date, don't rely on it.
Add a couple of unit tests for special floats. Fixes 13929, found by MemorySanitizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164698 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26 14:06:58 +00:00
Sylvestre Ledru
bec3ce0cb5 The assumption that /proc/self/exe always exists is incorrect.
For example, under a Linux chroot, /proc/ might not be mounted.
Therefor, we test if this file exist. If it is the case, use it (the current
behavior). Otherwise, we fall back to the detection used by *BSD.

The issue has been reported initially on the Debian bug tracker:
http://bugs.debian.org/674588



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164676 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26 08:30:35 +00:00
Nico Weber
d0a553e5ec Fix a -Wparentheses warning in the mingw build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164587 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25 05:24:16 +00:00
Craig Topper
a96a182474 Add LLVM_OVERRIDE to methods that override their base classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164471 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-23 02:12:10 +00:00
Eric Christopher
c69bdadac9 Add an --enable-backtraces option to configure to determine
whether or not we want to print out backtrace information. Useful
for libraries that don't need backtrace information on a crash.

rdar://11844710

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164426 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-21 23:03:29 +00:00
Andrew Kaylor
bbf628b6ce This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164249 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-19 20:46:12 +00:00
Craig Topper
86a1c32e67 Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163974 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-15 17:09:36 +00:00
Dmitri Gribenko
c5252da873 Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph);
* use \param instead of \arg to document parameters in order to be consistent
  with the rest of the codebase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163902 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14 14:57:36 +00:00
Roman Divacky
ee3392b1a9 Add support for AMD Geode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163710 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12 14:36:02 +00:00
Chandler Carruth
7b617158db Add support for finding cacheflush on OpenBSD/mips64 platforms.
Patch by Brad Smith!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163584 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 01:17:24 +00:00
Ted Kremenek
0d651e0c9d Add operator< for FoldingSetNodeID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163454 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-08 04:25:29 +00:00
NAKAMURA Takumi
2de91673ff Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163289 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 03:02:56 +00:00
NAKAMURA Takumi
383fb7f026 Unix/Signals.inc: Fix a typo. Thanks to Dani Berg!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163288 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-06 03:01:43 +00:00
Evgeniy Stepanov
68d92bdcc9 Fix Android build of gtest and lib/Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163131 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-04 09:14:45 +00:00
Logan Chien
43bf70986b Rename ANDROIDEABI to Android.
Most of the code guarded with ANDROIDEABI are not
ARM-specific, and having no relation with arm-eabi.
Thus, it will be more natural to call this
environment "Android" instead of "ANDROIDEABI".

Note: We are not using ANDROID because several projects
are using "-DANDROID" as the conditional compilation
flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163087 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-02 09:29:46 +00:00
Benjamin Kramer
e160c53fbe Add some __builtin_expect magic to StringMap.
Tombstones and full hash collisions are rare, mark the "empty"
and "no collision" paths as likely. The bug in simplifycfg
that prevented the hints from being picked during selfhost
up was fixed recently :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162874 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29 22:57:04 +00:00
Benjamin Kramer
55907d1274 Replace the BUILTIN_EXPECT macro with a less horrible LLVM_LIKELY/LLVM_UNLIKELY interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162873 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-29 22:57:00 +00:00