Commit Graph

877 Commits

Author SHA1 Message Date
Peter Collingbourne 915df9968b Implement no_sanitize attribute.
Differential Revision: http://reviews.llvm.org/D9631

llvm-svn: 237463
2015-05-15 18:33:32 +00:00
Sunil Srivastava 3acf6275e6 Changed renaming of local symbols by inserting a dot vefore the numeric suffix
details in http://reviews.llvm.org/D9483
goes with llvm checkin r237150

llvm-svn: 237151
2015-05-12 16:48:43 +00:00
Duncan P. N. Exon Smith 9dd4e4e63a DebugInfo: Metadata constructs now start with DI*
LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now
that the `DIDescriptor` hierarchy has been gone for about a week.  This
commit was generated using the rename-md-di-nodes.sh upgrade script
attached to PR23080, followed by running clang-format-diff.py on the
`lib/` portion of the patch.

llvm-svn: 236121
2015-04-29 16:40:08 +00:00
David Blaikie cb6b6f7e20 [opaque pointer type] Update test cases now that the type for an invoke is just a function type, not a pointer-to-function type
llvm-svn: 235756
2015-04-24 19:33:25 +00:00
David Majnemer dc012fa266 Revert "Revert r234581, it might have caused a few miscompiles in Chromium."
This reverts commit r234700.  It turns out that the lifetime markers
were not the cause of Chromium failing but a bug which was uncovered by
optimizations exposed by the markers.

llvm-svn: 235553
2015-04-22 21:38:15 +00:00
David Blaikie d6c88ece21 [opaque pointer types] Explicit non-pointer type for call expressions
(migration for recent LLVM change to textual IR for calls)

llvm-svn: 235147
2015-04-16 23:25:00 +00:00
Nico Weber 1c565c31b1 Revert r234581, it might have caused a few miscompiles in Chromium.
If the revert helps, I'll get a repro this Monday.  Else I'll put the change
back in.

llvm-svn: 234700
2015-04-11 23:51:38 +00:00
Arnaud A. de Grandmaison 047a686d53 Remove threshold for inserting lifetime markers for named temporaries
Now that TailRecursionElimination has been fixed with r222354, the
threshold on size for lifetime marker insertion can be removed. This
only affects named temporary though, as the patch for unnamed temporaries
is still in progress.

My previous commit (r222993) was not handling debuginfo correctly, but
this could only be seen with some asan tests. Basically, lifetime markers
are just instrumentation for the compiler's usage and should not affect
debug information; however, the cleanup infrastructure was assuming it
contained only destructors, i.e. actual code to be executed, and was
setting the breakpoint for the end of the function to the closing '}', and
not the return statement, in order to show some destructors have been
called when leaving the function. This is wrong when the cleanups are only
lifetime markers, and this is now fixed.

llvm-svn: 234581
2015-04-10 10:13:52 +00:00
Fariborz Jahanian 220d08d942 [Objective-C patch] Patch to fix a crash in IRGen because
of incorrect AST when a compound literal of Objective-C
property access is used to initialize a vertor of floats.
rdar://20407999

llvm-svn: 234176
2015-04-06 16:56:39 +00:00
Fariborz Jahanian 6a9c46bc3f [Objective-C metadata patch]. Patch to allocate one more space for
Protocol objects in OBJC2. rdar://20286356

llvm-svn: 233766
2015-03-31 22:22:40 +00:00
David Blaikie bdf40a62a7 Test case updates for explicit type parameter to the gep operator
llvm-svn: 232187
2015-03-13 18:21:46 +00:00
Duncan P. N. Exon Smith f04be1fb3a DebugInfo: Move new hierarchy into place (clang)
Update testcases for LLVM change in r231082 to use the new debug info
hierarchy.

llvm-svn: 231083
2015-03-03 17:25:55 +00:00
David Blaikie a953f2825b Update Clang tests to handle explicitly typed load changes in LLVM.
llvm-svn: 230795
2015-02-27 21:19:58 +00:00
David Blaikie 218b783192 Update Clang tests to handle explicitly typed gep changes in LLVM.
llvm-svn: 230783
2015-02-27 19:18:17 +00:00
David Blaikie 3a2f734b4c Remove trailing whitespace to help make test compatible with typeless pointer migration
llvm-svn: 229271
2015-02-15 04:12:17 +00:00
David Blaikie 4d52443c0e DebugInfo: Attribute cleanup code to the end of the scope, not the end of the function.
Now if you break on a dtor and go 'up' in your debugger (or you get an
asan failure in a dtor) during an exception unwind, you'll have more
context. Instead of all dtors appearing to be called from the '}' of the
function, they'll be attributed to the end of the scope of the variable,
the same as the non-exceptional dtor call.

This doesn't /quite/ remove all uses of CurEHLocation (which might be
nice to remove, for a few reasons) - it's still used to choose the
location for some other work in the landing pad. It'd be nice to
attribute that code to the same location as the exception calls within
the block and to remove CurEHLocation.

llvm-svn: 228181
2015-02-04 19:47:54 +00:00
David Majnemer 61968bc85a test: Make encode-test-5.m's output not dependent on its filename
Pipe the file into clang instead of passing the file path on the command
line.

llvm-svn: 227896
2015-02-02 23:38:27 +00:00
David Majnemer 5fc217451b FileCheck'ize CodeGenObjC test
This fixes PR22437.

llvm-svn: 227843
2015-02-02 19:30:54 +00:00
Duncan P. N. Exon Smith 8d3ef611ce IR: Move MDLocation into place (clang testcases)
Update testcases to match LLVM change in r226048.

llvm-svn: 226049
2015-01-14 22:28:03 +00:00
Duncan P. N. Exon Smith b3a66691f8 IR: Make metadata typeless in assembly, clang side
Match LLVM changes from r224257.

llvm-svn: 224259
2014-12-15 19:10:08 +00:00
Eric Christopher 0e2618857c Have the driver and the target code agree on what the default ABI
is for each machine. Fix up darwin tests that were testing for
aapcs on armv7-ios when the actual ABI is apcs.

Should be no user visible change without -cc1.

llvm-svn: 223429
2014-12-05 01:06:59 +00:00
Arnaud A. de Grandmaison f3470cc979 Revert "Remove threshold for lifetime marker insertion of named temporaries"
Revert r222993 while I investigate some MemorySanitizer failures.

llvm-svn: 222995
2014-12-01 09:30:16 +00:00
Arnaud A. de Grandmaison f2730e2d22 Remove threshold for lifetime marker insertion of named temporaries
Now that TailRecursionElimination has been fixed with r222354, the
threshold on size for lifetime marker insertion can be removed. This
only affects named temporary though, as the patch for unnamed temporaries
is still in progress.

llvm-svn: 222993
2014-12-01 09:13:54 +00:00
Adrian Prantl ebd1ef82ad relax this testcase to not depend on a specific alignment.
llvm-svn: 222490
2014-11-21 00:48:22 +00:00
Adrian Prantl 88eec39460 Debug info for blocks: Fix a bug caught by the Verifier.
When emitting nested block definitions, the insert-at-point variant of
DIBuilder::insertDeclare() could be called with the insertion point set
to the end-of-BasicBlock sentinel, causing the parent pointer of the
CallInst to be set to the intentionally bogus value of the sentinel.

Fixed by conditionally invoking the correct version of insertDeclare().
rdar://problem/19034882

llvm-svn: 222487
2014-11-21 00:35:25 +00:00
Rafael Espindola 8b27bdb6c2 Don't manually insert L prefixes.
Simply marking the symbol private conveys the desire to hide them to LLVM.

llvm-svn: 221451
2014-11-06 13:30:38 +00:00
Rafael Espindola ee2b96b230 Use FileCheck.
llvm-svn: 221435
2014-11-06 04:56:05 +00:00
Rafael Espindola 3be19cefa4 Delete dead test.
llvm-svn: 221434
2014-11-06 04:48:05 +00:00
Adrian Prantl 65d5d00cb7 Debug info: Emit the correct type for the __FuncPtr field in a block
descriptor.

rdar://problem/15984431

llvm-svn: 221326
2014-11-05 01:01:30 +00:00
Fariborz Jahanian 9ad94aa280 Objective-C. revert patch for rdar://17554063.
llvm-svn: 220812
2014-10-28 18:28:16 +00:00
David Blaikie 60a877b5b9 DebugInfo: Omit scopes in -gmlt to reduce metadata size (on disk and in memory)
I haven't done any actual impact analysis of this change as it's a
strict improvement, but I'd be curious to know how much it helps.

llvm-svn: 220408
2014-10-22 19:34:33 +00:00
Saleem Abdulrasool 3b43447619 CodeGen: correct block mangling in ObjC
Mangling for blocks defined within blocks in an ObjectiveC context were also
broken by SVN r219393.  Because the code in mangleName assumed that the code was
either C or C++, we would trigger assertions when trying to mangle the inner
blocks in an ObjectiveC context.

Add a test and use the ObjectiveC specific mangling when dealing with an
ObjectiveC method declaration.

llvm-svn: 219697
2014-10-14 17:20:18 +00:00
Arnaud A. de Grandmaison e69ec55cda Revert "Remove threshold on object size for inserting lifetime begin / end"
Revert this patch while I investigate some sanitizer failures off-line.

llvm-svn: 219307
2014-10-08 14:04:26 +00:00
Arnaud A. de Grandmaison 1b175e4098 Remove threshold on object size for inserting lifetime begin / end
Boostrapping LLVM+Clang+LLDB without threshold on object size for
lifetime markers insertion has shown there was no significant change
in compile time, so let the stack slot colorizer do its optimization
for all slots.

llvm-svn: 219303
2014-10-08 12:49:16 +00:00
Duncan P. N. Exon Smith 3c51fa6aae Revert "Revert "DI: LLVM schema change: fold constants into string""
This reverts commit r218917, effectively reapplying r218913.  Original
commit message follows.

--

Update debug info testcases for an LLVM metadata schema change to fold
metadata constant operands into a single `MDString`.

Part of PR17891.

llvm-svn: 219011
2014-10-03 20:01:52 +00:00
Duncan P. N. Exon Smith 834c265e85 Revert "DI: LLVM schema change: fold constants into string"
This reverts commit r218913 while I investigate some bots.

llvm-svn: 218917
2014-10-02 22:15:09 +00:00
Duncan P. N. Exon Smith 02b418a875 DI: LLVM schema change: fold constants into string
Update debug info testcases for an LLVM metadata schema change to fold
metadata constant operands into a single `MDString`.

Part of PR17891.

llvm-svn: 218913
2014-10-02 21:56:07 +00:00
Adrian Prantl 2706eb031d Update CGDebugInfo to the updated API in LLVM.
Complex address expressions are no longer part of DIVariable, but
rather an extra argument to the debug intrinsics.

http://reviews.llvm.org/D4919
rdar://problem/17994491

llvm-svn: 218788
2014-10-01 18:55:34 +00:00
Adrian Prantl af11fdba0a Reverting r218777 while investigating buildbot breakage.
"Update CGDebugInfo to the updated API in LLVM."

llvm-svn: 218781
2014-10-01 18:10:14 +00:00
Adrian Prantl 1400aaf8c8 Update CGDebugInfo to the updated API in LLVM.
Complex address expressions are no longer part of DIVariable, but
rather an extra argument to the debug intrinsics.

http://reviews.llvm.org/D4919
rdar://problem/17994491

llvm-svn: 218777
2014-10-01 17:55:09 +00:00
Rafael Espindola 2461509cc1 Allow protocols to be just declared.
llvm-svn: 217704
2014-09-12 20:14:20 +00:00
Adrian Prantl 21361fb308 Debug info: Only emit C++ accessibility specifiers when they are diverging
from the default for the containing type.

rdar://problem/18154959

llvm-svn: 216800
2014-08-29 22:44:27 +00:00
Fariborz Jahanian 85b99da72a Objective-C IRGen. Fixes an assertion crash caused by inconsistent
linkage related to generation of OBJC_SELECTOR_REFERENCES symbol 
needed in generation of call to 'super' in a class method.
// rdar://18150301

llvm-svn: 216676
2014-08-28 17:05:17 +00:00
Fariborz Jahanian 9c56fc956f Objective-C. Fixes an assert where because of captured
variable in block is over-aligned with an align
attribute causing block metadata size not be multiple
of alignment. rdar://17878679

llvm-svn: 215449
2014-08-12 15:51:49 +00:00
Frederic Riss 787d9d640e Debuginfo: Correctly tag variadic ObjC methods with DW_TAG_unspecified_parameter.
Fixes rdar://13690847

llvm-svn: 215423
2014-08-12 04:42:23 +00:00
Fariborz Jahanian 495bc3f5f6 Objective-C ARC. Use of non-retain/autorelease API
for building Objective-C array literals in ARC
mode. rdar://17554063

llvm-svn: 215232
2014-08-08 17:31:14 +00:00
Fariborz Jahanian d45e7cec42 Objective-C arc. Switch the Objective-C dictionary literal in ARC mode
to use non-retain/autorelease API variants of ObjC objects. wip.
rdar://17554063

llvm-svn: 215146
2014-08-07 20:57:35 +00:00
Fariborz Jahanian 2a25dba153 Objective-C ARC. More code for Objective-C's
new APIs for literals. nfc. wip. rdar://17554063

llvm-svn: 215043
2014-08-06 23:40:31 +00:00
Tobias Grosser b3af390087 Revert "Emit column debug information for loads"
This broke the following gdb tests:

gdb.base__annota1.exp
gdb.base__consecutive.exp
gdb.python__py-symtab.exp
gdb.reverse__consecutive-precsave.exp
gdb.reverse__consecutive-reverse.exp

I will look into this.

This reverts commit 214162.

llvm-svn: 214163
2014-07-29 06:53:14 +00:00
Tobias Grosser 01b923d55b Emit column debug information for loads
This allows us to give more precise diagnostics.

Diego kindly tested the impact on debug info size: "The increase on average
debug sizes is 0.1%. The total file size increase is ~0%."

llvm-svn: 214162
2014-07-29 06:10:47 +00:00