Commit Graph

143242 Commits

Author SHA1 Message Date
Owen Anderson 132ae8b955 Conditionalize constant folding of math intrinsics on the availability of an implementation on the host. This is a little bit unfortunate, but until someone decides to implement a full libm for APFloat, we don't have a better way to get this functionality.
llvm-svn: 174561
2013-02-07 00:21:34 +00:00
Douglas Gregor 5dc3899ca4 Introduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading modules.
The use of this flag enables a modules optimization where a given set
of macros can be labeled as "ignored" by the modules
system. Definitions of those macros will be completely ignored when
building the module hash and will be stripped when actually building
modules. The overall effect is that this flag can be used to
drastically reduce the number of

Eventually, we'll want modules to tell us what set of macros they
respond to (the "configuration macros"), and anything not in that set
will be excluded. However, that requires a lot of per-module
information that must be accurate, whereas this option can be used
more readily.

Fixes the rest of <rdar://problem/13165109>.

llvm-svn: 174560
2013-02-07 00:21:12 +00:00
Nico Weber 0588b509af Formatter: Move ObjC literal tests to its own test case.
Slightly expand the boxed expressions test with a few more snippets from
http://clang.llvm.org/docs/ObjectiveCLiterals.html

llvm-svn: 174559
2013-02-07 00:19:29 +00:00
Greg Clayton cb9c8cf84c Be ready for fully qualified hash names in the __apples_types tables.
llvm-svn: 174558
2013-02-06 23:56:13 +00:00
Sean Callanan c3a1d5629a Fixed a problem that would cause LLDB to crash
if it encountered bad debug information.  This
debug information had an Objective-C method whose
selector disagreed with the true number of arguments
to that method.

<rdar://problem/12992864>

llvm-svn: 174557
2013-02-06 23:21:59 +00:00
Greg Clayton 1f380ea29a Removed debug print line I left in.
llvm-svn: 174556
2013-02-06 22:52:04 +00:00
Owen Anderson d4ebfd8400 Signficantly generalize our ability to constant fold floating point intrinsics, including ones on half types.
llvm-svn: 174555
2013-02-06 22:43:31 +00:00
Douglas Gregor 8a114ab557 Detect when we end up trying to load conflicting module files.
This can happen when one abuses precompiled headers by passing more -D
options when using a precompiled hedaer than when it was built. This
is intentionally permitted by precompiled headers (and is exploited by
some build environments), but causes problems for modules.

First part of <rdar://problem/13165109>, detecting when something when
horribly wrong.

llvm-svn: 174554
2013-02-06 22:40:31 +00:00
Eli Bendersky d5d4c89bf0 Fix typo
llvm-svn: 174553
2013-02-06 22:34:46 +00:00
Michael J. Spencer 18131ae08d [Support][ErrorOr] Add support for convertable types.
Thanks to Andrew, David, and Aaron for helping fix this.

llvm-svn: 174552
2013-02-06 22:28:53 +00:00
Eli Bendersky 9fcfe1ed89 Add a comment to the test that points to the source from which the input object
file was generated.

llvm-svn: 174551
2013-02-06 22:17:40 +00:00
Joe Abbey 97b7a1719e Code Custodian (trivial whitespace cleanup)
llvm-svn: 174550
2013-02-06 22:14:06 +00:00
Daniel Jasper f79f935f38 Fix bug in the alignment of comments.
Before:
const char *test[] = {
  // A
  "aaaa",
               // B
  "aaaaa",
};

After:
const char *test[] = {
  // A
  "aaaa",
  // B
  "aaaaa",
};

llvm-svn: 174549
2013-02-06 22:04:05 +00:00
Eric Christopher 5b33b3c3be Clean up multiple skeleton compile units if we have multiple compile
units coming in.

llvm-svn: 174548
2013-02-06 21:53:56 +00:00
Eric Christopher 30be9f8cee Remove some dead code.
llvm-svn: 174547
2013-02-06 21:53:53 +00:00
Akira Hatanaka 556135d813 [mips] Make NOP a pseudo instruction and expand it to "sll $zero, $zero, 0".
llvm-svn: 174546
2013-02-06 21:50:15 +00:00
Daniel Jasper ba9ddb66e1 Become a little smarter with formatting long chains of pipes.
Assign a high penalty to breaking before "<<" if the previous token is a
string literal ending in ":" or "=".

Before:
llvm::outs()
    << "aaaaaaaaaaaaaaaaa = " << aaaaaaaaaaaaaaaaa << "bbbbbbbbbbbbbbbbb = "
    << bbbbbbbbbbbbbbbbb << "ccccccccccccccccc = " << ccccccccccccccccc
    << "ddddddddddddddddd = " << ddddddddddddddddd << "eeeeeeeeeeeeeeeee = "
    << eeeeeeeeeeeeeeeee;

After:
llvm::outs() << "aaaaaaaaaaaaaaaaa = " << aaaaaaaaaaaaaaaaa
             << "bbbbbbbbbbbbbbbbb = " << bbbbbbbbbbbbbbbbb
             << "ccccccccccccccccc = " << ccccccccccccccccc
             << "ddddddddddddddddd = " << ddddddddddddddddd
             << "eeeeeeeeeeeeeeeee = " << eeeeeeeeeeeeeeeee;

llvm-svn: 174545
2013-02-06 21:04:05 +00:00
Howard Hinnant d3d4356f6e Marcin Zalewski: Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.
llvm-svn: 174544
2013-02-06 21:03:39 +00:00
Eli Bendersky c0d905c0e9 Add a test for checking the current .debug_frame dumping capability.
The test is a binary placed in test/DebugInfo/Inputs, with a source C
file used for reference/reproducing. The source's first line is a clang
build command for reproducing the binary.

llvm-svn: 174543
2013-02-06 20:55:06 +00:00
Eli Bendersky ef4558abd3 This is a follow-up on r174446, now taking Atom processors into
account. Atoms use LEA for updating SP in prologs/epilogs, and the
exact LEA opcode depends on the data model.

Also reapplying the test case which was added and then reverted
(because of Atom failures), this time specifying explicitly the CPU in
addition to the triple. The test case now checks all variations (data
mode, cpu Atom vs. Core).

llvm-svn: 174542
2013-02-06 20:43:57 +00:00
Guy Benyei 5ea04c385f Canonicalize line endings to Linux style also when the --strict-whitespace flag is in use. This flag is supposed to affect horizontal whitespaces only.
llvm-svn: 174541
2013-02-06 20:40:38 +00:00
Manuel Klimek 4feac28e0e Cleanup of ASTMatcher macros and adding support for overloaded matchers.
This is in preparation for adding other overloaded matchers. This change
alone is a net win in LOC.
I went through all matchers and looked whether we could now encode them
as macro, or simplify them with the matcher atoms that were not
available before.

llvm-svn: 174540
2013-02-06 20:36:22 +00:00
Howard Hinnant 584a65befd Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitting the timing limits too often.
llvm-svn: 174539
2013-02-06 20:25:56 +00:00
Daniel Dunbar 05abe9372b [tests] Infer the cxx_under_test (as clang++).
- This is a reasonable default, and makes testing just work with no required
   parameters.

 - Add notes on all of the inferred or default values.

llvm-svn: 174538
2013-02-06 20:24:23 +00:00
Daniel Jasper 94f0e1382a Align trailing block comments like trailing line comments.
llvm-svn: 174537
2013-02-06 20:07:35 +00:00
Bill Wendling 8911b86400 Improve comment.
llvm-svn: 174536
2013-02-06 20:05:44 +00:00
Howard Hinnant 2b853bf65f Partially revert r152770. That commit moved the default handlers to their own file. But it also did some refactoring. It is the latter that is being reverted. The refactoring had accidentally removed the required effect that the default unexpected_handler calls std::terminate(), which is a visible effect.
llvm-svn: 174532
2013-02-06 19:29:55 +00:00
Ted Kremenek c43636a53d Remove unneeded test. We have plenty of subgroup relations between warnings,
and for those we care about we should have a general way of testing them.

llvm-svn: 174531
2013-02-06 19:24:28 +00:00
Jordan Rose dd77041973 Accept and ignore the -fextended-identifiers option.
This was GCC's option to turn on UCN support, which we always have on now
in C99 and C++ modes.

Additionally, mark the -fno-extended-identifiers option as unsupported,
since we don't support disabling UCNs in C99 and C++ modes.

PR11538

llvm-svn: 174530
2013-02-06 18:15:40 +00:00
Douglas Gregor cb680661eb Eliminate a race condition with the global module index.
Essentially, a module file on disk could change size between the time
we stat() it and the time we open it, and we need to be robust against
such a problem.

llvm-svn: 174529
2013-02-06 18:08:37 +00:00
Daniel Dunbar 5178942ded [tests] Change test default to run against locally built library.
llvm-svn: 174528
2013-02-06 17:47:08 +00:00
Daniel Dunbar d2d614cd84 [tests] Enable use_system_lib support on Linux.
- Patch by Michael van der Westhuizen.

llvm-svn: 174527
2013-02-06 17:45:53 +00:00
Bill Schmidt ef17c14254 PPC calling convention cleanup.
Most of PPCCallingConv.td is used only by the 32-bit SVR4 ABI.  Rename
things to clarify this.  Also delete some code that's been commented out
for a long time.

llvm-svn: 174526
2013-02-06 17:33:58 +00:00
Tom Stellard f3b2a1e8b3 R600: Support for indirect addressing v4
Only implemented for R600 so far.  SI is missing implementations of a
few callbacks used by the Indirect Addressing pass and needs code to
handle frame indices.

At the moment R600 only supports array sizes of 16 dwords or less.
Register packing of vector types is currently disabled, which means that a
vec4 is stored in T0_X, T1_X, T2_X, T3_X, rather than T0_XYZW. In order
to correctly pack registers in all cases, we will need to implement an
analysis pass for R600 that determines the correct vector width for each
array.

v2:
  - Add support for i8 zext load from stack.
  - Coding style fixes

v3:
  - Don't reserve registers for indirect addressing when it isn't
    being used.
  - Fix bug caused by LLVM limiting the number of SubRegIndex
    declarations.

v4:
  - Fix 64-bit defines

llvm-svn: 174525
2013-02-06 17:32:29 +00:00
Greg Clayton 5ce9c5657c <rdar://problem/13159777>
lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules.

LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required.

Added a new logging channel for "lldb" called "mmap" to help track future regressions.

Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to.

The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info.

llvm-svn: 174524
2013-02-06 17:22:03 +00:00
Daniel Malea 0e1cf09c89 Fix bug in test harness to allow running dotest.py without "--executable" flag on Linux
- resolves errors in cases that run the lldb CLI utility

llvm-svn: 174522
2013-02-06 16:55:07 +00:00
Nico Weber ac9bde236f Formatter: Correctly detect ObjC message expressions preceded by a comment.
llvm-svn: 174521
2013-02-06 16:54:35 +00:00
Daniel Malea eed92fb10c Fix to build tests with GCC: update makefiles in two watchpoint testcases
llvm-svn: 174520
2013-02-06 16:51:24 +00:00
Daniel Malea 0b464d483b Fix GCC 4.6 build by avoiding delegating ctors
Patch by Abid Hafiz!

llvm-svn: 174519
2013-02-06 16:46:40 +00:00
Tim Northover 228d9d3aa2 Implement external weak (ELF) symbols on AArch64
Weakly defined symbols should evaluate to 0 if they're undefined at
link-time. This is impossible to do with the usual address generation
patterns, so we should use a literal pool entry to materlialise the
address.

llvm-svn: 174518
2013-02-06 16:43:33 +00:00
Manuel Klimek 82b836a61d Fix handling of comments in macros.
We now correctly format:
 // Written as a macro, it is reformatted from:
 #define foo(a)                                                                \
   do {                                                                        \
     /* Initialize num to zero. */                                             \
     int num = 10;                                                             \
     /* This line ensures a is never zero. */                                  \
     int i = a == 0 ? 1 : a;                                                   \
     i = num / i; /* This division is OK. */                                   \
     return i;                                                                 \
   } while (false)

llvm-svn: 174517
2013-02-06 16:40:56 +00:00
Alexey Samsonov 85cc9b655d [TSan] skip multiple internal frames, if necessary
llvm-svn: 174516
2013-02-06 16:28:05 +00:00
Eli Bendersky 582320603b Add some comments to new frame entries
llvm-svn: 174515
2013-02-06 16:20:31 +00:00
Manuel Klimek 046b9306d4 Much semicolon after namespaces.
We now leave the semicolon in the line of the closing brace in:
namespace {
...
};

llvm-svn: 174514
2013-02-06 16:08:09 +00:00
Daniel Jasper c485b4e5b8 Fix formatting of ObjC method calls.
This fixes llvm.org/PR15165.

We now correctly align:
  [image_rep drawInRect:drawRect
               fromRect:NSZeroRect
              operation:NSCompositeCopy
               fraction:1.0
             ssssssssdd:NO
                  hints:nil];

llvm-svn: 174513
2013-02-06 16:00:26 +00:00
Manuel Klimek d265090cd6 Parse record declarations with token pasted identifiers.
This is pretty common in macros:
 #define A(X, Y) class X##Y {};

llvm-svn: 174512
2013-02-06 15:57:54 +00:00
Alexander Potapenko 09aba10499 [ASan] fix the interceptor for siglongjmp. As we're using dylib interposition, we must intercept both siglongjmp and longjmp on Darwin.
llvm-svn: 174510
2013-02-06 15:45:43 +00:00
Daniel Jasper 3839659140 Fix a formatting bug caused by comments in expressions.
This fixes llvm.org/PR15162.

Before:
    bool aaaaaaaaaaaaa =  // comment
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                          aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                          aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
    bool aaaaaaaaaaaaa =  // comment
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

llvm-svn: 174508
2013-02-06 15:23:09 +00:00
Alexander Potapenko d895ae94f9 Use 64-bit inodes in file operations. ASan is now built with -mmacosx-version-min=10.5, thus the default inode
size is 32 bits. However the supported client code is going to target 10.6 and higher, where 64-bit inodes will be used.

llvm-svn: 174507
2013-02-06 14:41:15 +00:00
Kostya Serebryany 21bedab7a1 [tsan] improve FrameIsInternal
llvm-svn: 174506
2013-02-06 14:32:16 +00:00