Commit Graph

124813 Commits

Author SHA1 Message Date
Richard Smith 6da64f39d4 Forward-declared enumerations are now complete, except for an interaction
between unscoped enumerations and class template member specializations,
whose behavior is currently under discussion in CWG (and for which there
is a preference to not implement the currently-standardized wording).

llvm-svn: 153464
2012-03-26 20:31:41 +00:00
Andrew Trick 14779cc49e LSR ivchain bug fix: corner case with ConstantExpr.
Fixes PR11950.

llvm-svn: 153463
2012-03-26 20:28:37 +00:00
Andrew Trick 356a896394 comment typo
llvm-svn: 153462
2012-03-26 20:28:35 +00:00
Richard Smith 169f219001 Add a special-case diagnostic for one of the more obnoxious special cases of
unscoped enumeration members: an enumerator name which is visible in the
out-of-class definition of a member of a templated class might not actually
exist in the instantiation of that class, if the enumeration is also lexically
defined outside the class definition and is explicitly specialized.

Depending on the result of a CWG discussion, we may have a different resolution
for a class of problems in this area, but this fixes the immediate issue of a
crash-on-invalid / accepts-invalid (depending on +Asserts). Thanks to Johannes
Schaub for digging into the standard wording to find how this case is currently
specified to behave.

llvm-svn: 153461
2012-03-26 20:28:16 +00:00
Daniel Dunbar eec0abefb6 [tests] Fix test failure in release mode.
llvm-svn: 153460
2012-03-26 20:18:16 +00:00
Benjamin Kramer a4988caa26 Simplify code, no functionality change.
llvm-svn: 153459
2012-03-26 20:12:15 +00:00
Chris Lattner b1e2e1e091 eliminate an unneeded branch, part of PR12357
llvm-svn: 153458
2012-03-26 19:13:57 +00:00
Chris Lattner 9e4e335281 fix a failure path to print the right thing, part of PR12357
llvm-svn: 153457
2012-03-26 19:11:51 +00:00
Eric Christopher 2b40fdf3ae Tidy.
llvm-svn: 153456
2012-03-26 19:09:40 +00:00
Eric Christopher f16bee8682 Tidy.
llvm-svn: 153455
2012-03-26 19:09:38 +00:00
Daniel Dunbar 94d34ca2d9 Revert r153443 "objective-c modern translator: extern "C" exported", it fails in testing.
llvm-svn: 153454
2012-03-26 18:48:59 +00:00
Anna Zaks a651c4099d [analyzer] Malloc: Allow a pointer to escape through OSAtomicEnqueue.
llvm-svn: 153453
2012-03-26 18:18:39 +00:00
Chad Rosier 08e57e5ccf Revert r153423 as this is causing failures on our internal nightly testers.
Original commit message:
Use the new range metadata in computeMaskedBits and add a new optimization to
instruction simplify that lets us remove an and when loading a boolean value.

llvm-svn: 153452
2012-03-26 18:07:14 +00:00
Andrew Trick e51feea79c LSR cleanup: potential bug caught by PVS-Studio.
Thanks Andrey.

llvm-svn: 153451
2012-03-26 18:03:16 +00:00
Daniel Dunbar 9a05c8b479 docs/lit: Add some notes on the lit test run output format.
llvm-svn: 153450
2012-03-26 18:01:14 +00:00
Akira Hatanaka efe96a682d Test case for r153348.
llvm-svn: 153449
2012-03-26 17:37:20 +00:00
Kostya Serebryany 6f8a776041 [tsan] treat vtable pointer updates in a special way (requires tbaa); fix a bug (forgot to return true after instrumenting); make sure the tsan tests are run
llvm-svn: 153448
2012-03-26 17:35:03 +00:00
Kostya Serebryany 141e46faf0 add tbaa metadata to vtable pointer loads/stores
llvm-svn: 153447
2012-03-26 17:03:51 +00:00
Benjamin Kramer db534a4eb9 Move CodeCompletionBuilder's chunk adding methods out of line.
This makes sense because chunk's ctor is also out of line and simplifies considerably
when inlined with a constant parameter. Shrinks clang on i386-linux-Release+Asserts by 65k.

llvm-svn: 153446
2012-03-26 16:57:36 +00:00
Douglas Gregor b11f94590c When diagnosing an invalid out-of-line redeclaration, don't permit
typo correction to introduce a nested-name-specifier; we aren't
prepared to handle it here. Fixes PR12297 / <rdar://problem/11075219>.

llvm-svn: 153445
2012-03-26 16:54:18 +00:00
Alexey Samsonov 0a4f8dc0cb [ASan] add interceptor for strtol
llvm-svn: 153444
2012-03-26 16:42:22 +00:00
Fariborz Jahanian c29ebc36b1 objective-c modern translator: extern "C" exported
symbols. // rdar://11103982

llvm-svn: 153443
2012-03-26 16:29:49 +00:00
Douglas Gregor 9f21889a7d Canonicalize the declaration we write to a PCH file for an
InjectedClassNameType; otherwise, it won't be properly wired to the
original (canonical) declaration when it is deserialized. Fixes
<rdar://problem/11112464>.

llvm-svn: 153442
2012-03-26 15:52:37 +00:00
Benjamin Kramer e6f5123e16 Driver: Factor string vector push_back into a helper class and optimize it.
Due to lack of move semantics we would create a temporary std::string from the
string literal, copy it into the vector and discard the temporary. This leads
to massive code bloat, optimizing it saves 50k on i386-linux-Release+Asserts.

While there add a two-element overload for push_back, simplifying code a bit.

llvm-svn: 153441
2012-03-26 15:39:31 +00:00
Hongbin Zheng 0578aaf77c Don't fail the lli testcases on 32bit platform.
llvm-svn: 153440
2012-03-26 15:16:48 +00:00
Hongbin Zheng b85c0b3e0c Out-of-tree build: Load the configuration of the installed llvm.
llvm-svn: 153439
2012-03-26 15:16:29 +00:00
Benjamin Kramer 3e6719c133 No need to do an expensive stable sort for a bunch of integers.
llvm-svn: 153438
2012-03-26 14:17:26 +00:00
Benjamin Kramer 40b099b068 ThreadSafetyReporter: Manage diagnostics in a std::list.
std::list is expensive, but so is std::sorting a SmallVector of SmallVectors of
heavyweight PartialDiagnostics.

Saves ~30k in a i386-linux-Release+Asserts clang build.

llvm-svn: 153437
2012-03-26 14:05:40 +00:00
Douglas Gregor c0f6380464 Add missing include of <new>
llvm-svn: 153436
2012-03-26 14:04:17 +00:00
Anton Korobeynikov 4547077a2b Fix GetMainExecutable on kFreeBSD.
Patch by Sylvestre Ledru!

llvm-svn: 153435
2012-03-26 12:05:51 +00:00
Benjamin Kramer df2348ecf3 Remove stale CBackend tests.
llvm-svn: 153433
2012-03-26 11:16:50 +00:00
Benjamin Kramer c16e09bb80 TableGen: Don't emit the llvm intrinsic -> gcc builtin table, its only user was the c backend.
llvm-svn: 153432
2012-03-26 11:08:03 +00:00
Evgeniy Stepanov 4cc2631c7d Avoid including link.h.
It's not available on Android. We only use this header to find out if _DYNAMIC
is present; declaring it "extern void*" does the trick.

llvm-svn: 153431
2012-03-26 09:48:41 +00:00
Alexey Samsonov 1fd5dbc140 [ASan] use macro to define if we should intercept signal/sigaction
llvm-svn: 153430
2012-03-26 09:07:29 +00:00
Craig Topper 6e80c28017 Prune some includes and forward declarations.
llvm-svn: 153429
2012-03-26 06:58:25 +00:00
Eric Christopher c1e2dcdb8a Add a debug statement.
llvm-svn: 153428
2012-03-26 06:10:32 +00:00
Richard Smith 2e6610affd Handle instantiations of redeclarations of forward-declared enumerations within
templated functions. Build a redeclaration chain, and only instantiate the
definition of the enum when visiting the defining declaration.

llvm-svn: 153427
2012-03-26 04:58:10 +00:00
Richard Smith 258a744bbd Delay checking of dependent underlying types for redeclarations of member
enumerations in templates until the template is instantiated.

llvm-svn: 153426
2012-03-26 04:08:46 +00:00
Eric Christopher eb75cc26af Add some fixes to the configure script for isInf and add
--enable-libcpp to projects/sample.

Patch by Dmitri Shubin with additional fixes by me.

llvm-svn: 153425
2012-03-26 02:09:01 +00:00
Eric Christopher 885ed8240e Update documentation for old api changes.
Fixes PR12050

llvm-svn: 153424
2012-03-26 01:56:34 +00:00
Rafael Espindola df9b4adb82 Use the new range metadata in computeMaskedBits and add a new optimization to
instruction simplify that lets us remove an and when loding a boolean value.

llvm-svn: 153423
2012-03-26 01:44:11 +00:00
Craig Topper 5fa0caafc0 Prune includes and replace uses of ARMRegisterInfo.h with ARMBaeRegisterInfo.h
llvm-svn: 153422
2012-03-26 00:45:15 +00:00
Craig Topper 07720d8dcd Replace uses of ARMBaseInstrInfo and ARMTargetMachine with the Base versions.
llvm-svn: 153421
2012-03-25 23:49:58 +00:00
Aaron Ballman eceaddc864 Since this change is generating a considerable amount of discussion (and possibly even a regression for known bad versions), I'm reverting it.
llvm-svn: 153420
2012-03-25 22:46:17 +00:00
Chandler Carruth 8059c84af1 Teach instsimplify how to simplify comparisons of pointers which are
constant-offsets of a common base using the generic GEP-walking logic
I added for computing pointer differences in the same situation.

llvm-svn: 153419
2012-03-25 21:28:14 +00:00
Chandler Carruth 2741aae80b Switch the pointer-difference simplification logic to only work with
inbounds GEPs. This isn't really necessary for simplifying pointer
differences, but I'm planning to re-use the same code to simplify
pointer comparisons where it is necessary. Since real code almost
exclusively uses inbounds GEPs, it doesn't seem worth it to support the
extra complexity of turning it on and off. If anyone would like that
back, feel free to shout. Note that instcombine will still catch any of
these patterns.

llvm-svn: 153418
2012-03-25 20:43:07 +00:00
Eric Christopher 6cc6e60b6e Use GetClangDeclContextForDIE, it'll find the cached one
if it's there and we may not have a cached die yet. This
fixes a bunch of false positives on "die has no decl".

llvm-svn: 153417
2012-03-25 19:37:33 +00:00
Eric Christopher ffe318dbb3 Fix method name for output.
llvm-svn: 153416
2012-03-25 19:30:08 +00:00
Craig Topper d4a964cd70 Prune some includes and forward declarations.
llvm-svn: 153415
2012-03-25 18:10:17 +00:00
Craig Topper 7a901d98f6 Prune some includes and forward declarations.
llvm-svn: 153414
2012-03-25 18:09:44 +00:00