Erik Eckstein
3751991798
Adapt to llvm debuginfo change: use DITypeArray instead of DIArray in some places
...
Swift SVN r20672
2014-07-29 15:13:21 +00:00
Adrian Prantl
0d2d2d32b1
Debug info: Improve handling of storage-less variables.
...
Swift SVN r20546
2014-07-25 16:47:59 +00:00
Adrian Prantl
b1a7a7af1b
Reference-count inlined functions to keep them alive until we emit debug
...
info for them and generally clean up the inline scope handling a bit.
Fix the debug scope handling for all clients of SILCloner, especially
the SIL-level spezializers and inliners.
This also adds a ton of additional assertions that will ensure that
future optimization passes won't mess with the debug info in a way that
could confuse the LLVM backend.
Swift SVN r18984
2014-06-18 22:34:10 +00:00
Bob Wilson
2df66cf8c4
Implement inline scopes for the performance inliner.
...
Mandatory-inlined (aka transparent functions) are still treated as if they
had the location and scope of the call site. <rdar://problem/14845844>
Support inline scopes once we have an optimizing SIL-based inliner
Patch by Adrian Prantl.
Swift SVN r18835
2014-06-12 19:48:43 +00:00
Adrian Prantl
0b7f82bcc9
Linetable: Make sure the function prologue ends after manipulating the
...
stackpointer.
<rdar://problem/16903725> Line tables seem to assume prologue ends one instruction too early
Swift SVN r18284
2014-05-17 23:41:07 +00:00
Adrian Prantl
98383a5c6a
Debug info: Use WeakVHs in DIRefMap so LLDB can safely invoke IRGen more
...
than once (at least as far as IRGenDebugInfo is concerned).
No new testcases, but it comes with new assertions.
Part of <rdar://problem/15283227> A crash in llvm's getFnAttributes when IRGen is called more than once.
Swift SVN r18214
2014-05-16 21:26:06 +00:00
Adrian Prantl
fcc346c874
Run clang-format on IRGenDebugInfo.*
...
Swift SVN r18035
2014-05-13 22:48:35 +00:00
Adrian Prantl
bb9be80edf
Debug Info: Factor out createPointerSizedStruct for leaf types that
...
have mangled names.
Swift SVN r18034
2014-05-13 22:48:31 +00:00
John McCall
d7b44f2dc6
Correctly substitute field types when building debug info
...
for specializations of generic types.
Also remove some impossible error handling and simplify an API.
Swift SVN r17989
2014-05-13 02:09:22 +00:00
Adrian Prantl
c0b5da0d7f
[please update LLVM] Debug info: Support multi-valued explosions, e.g.,
...
tuples and structs that are passed to a function by value.
<rdar://problem/15928331> Need to support DW_OP_piece for multi-Value variables/arguments
<rdar://problem/16599747> Variables not displayed at all in SwiftDemo02b_Closure (back again)
Swift SVN r17923
2014-05-12 03:31:07 +00:00
Adrian Prantl
f68f0e81d1
Debug info: represent function pointers as indirect function types.
...
<rdar://problem/14960518> Incorrect debug info for function pointer
Swift SVN r16716
2014-04-23 20:59:45 +00:00
Adrian Prantl
0851268d4f
Run clang-format on this IRGenDebugInfo.h
...
Swift SVN r16715
2014-04-23 20:59:44 +00:00
Adrian Prantl
b1d9d186a0
[please update llvm] Debug info: Use the mangled name as unique identifier
...
for types where possible.
We use the DICompositeType's UniqueIdentifier field to store the mangled
name, the name field to store the base name and Apple-llvm will emit the
unique identifier as DW_AT_name if RunTimeLang == Swift. This way the
metadata format is compatible between swift and non-Apple clang.
As bonus, we get mangled-name-based type uniquing for swift.
<rdar://problem/16303510> apple-types accelerator table should include basename for swift types
Swift SVN r16665
2014-04-22 21:55:32 +00:00
Adrian Prantl
a17c8cccc0
Debug Info: Emit all types (with the exception of builtins and qualified
...
types) in their actual context rather than the context of their first use.
Fixes several FIXMEs and <rdar://problem/16654720>.
Swift SVN r16596
2014-04-20 19:32:35 +00:00
Adrian Prantl
9306fef294
Debug info: Emit the appropriate decl_file/line for import declarations.
...
rdar://problem/16565308
Swift SVN r16353
2014-04-15 03:08:22 +00:00
Adrian Prantl
79feaa894f
[update LLVM] Debug info: Emit modules as DW_TAG_module.
...
<rdar://problem/16513629> Cleanup DWARF output for WWDC
<rdar://problem/16565308> Fix debug info for modules after LLVM r205685
Swift SVN r16352
2014-04-15 02:31:10 +00:00
Adrian Prantl
3db3eab09c
Debug info: Cleanup: use a single catch-all for all internal opaque types.
...
Swift SVN r16132
2014-04-09 22:09:03 +00:00
Adrian Prantl
8d0e1d3376
[PLEASE UPDATE LLVM/CLANG] Debug info: Rebase DWARF output for imported
...
modules on LLVM/trunk.
This should fix most open module related bugs and in a way that is
compatible with upstream LLVM.
<rdar://problem/16539726> Fix debug info for modules after LLVM r205685
<rdar://problem/16504765> Emit DW_TAG_namespace entry for the current module into DWARF
Swift SVN r16086
2014-04-09 00:11:02 +00:00
Greg Parker
a11eff260f
Adapt to header file changes in llvm r203038 and r203046.
...
Swift SVN r14716
2014-03-06 02:04:32 +00:00
Dmitri Hrybenko
a39d5b4f42
Track LLVM ToT header file name changes
...
This should unbreak the buildbot.
Swift SVN r14642
2014-03-04 13:11:01 +00:00
Adrian Prantl
8948375658
Debug Info: Cleanup: Remove debug scope from DebugTypeInfo.
...
Swift SVN r14548
2014-03-01 00:50:50 +00:00
Adrian Prantl
c1eda9c7e7
Debug info: do not emit linetable info for ObjC thunks and other auto_gen
...
code.
<rdar://problem/15975329> Don't emit line numbers for Thunks
Swift SVN r13872
2014-02-13 20:33:33 +00:00
Adrian Prantl
7468054191
Debug info: Emit O0 shadow copies more consistently for (most) debuggable
...
values.
Swift SVN r12803
2014-01-22 22:42:07 +00:00
Adrian Prantl
03bb47e017
Debug info: Emit "global" variables in the top level module as static
...
variables of SWIFT_ENTRY_POINT_FUNCTION.
<rdar://problem/15805751> Emit top-level variables as DWARF
Swift SVN r12362
2014-01-15 23:56:27 +00:00
Adrian Prantl
395bd1eede
Debug info: record the module name in DWARF. For the time being this is
...
done via an DW_TAG_imported_module.
rdar://problem/15711613.
Swift SVN r12035
2014-01-08 02:34:29 +00:00
Adrian Prantl
baa048e89a
Remove functions from the debug info generator's internal data structures
...
prior to erasing them from the module. This should fix
<rdar://problem/15700509> ASan reports a use-after-free in IRGen
Swift SVN r11479
2013-12-19 19:37:56 +00:00
Connor Wakamo
59f18f9fc0
Renamed irgen::Options and irgen::OutputKind to IRGenOptions and IRGenOutputKind, and move both out of the irgen namespace now that they're in swiftAST.
...
Swift SVN r11405
2013-12-18 01:17:09 +00:00
Adrian Prantl
1bcbaedcd0
Debug info: get rid of intrinsickind.
...
Swift SVN r11101
2013-12-10 23:53:18 +00:00
Adrian Prantl
e385446593
Debug info: Get the storage size of basic types from llvm::DataLayout.
...
Swift SVN r10925
2013-12-06 18:15:39 +00:00
Adrian Prantl
2055386e0c
Debug Info: Move the argument ordering logic into IRGenSILFunction and
...
get rid of the hack that used to be in IRGenDebugInfo.
This commit also adds a bunch of interesting testcases for function args.
Fixes <rdar://problem/15464454> Arguments sometimes go missing.
Swift SVN r10873
2013-12-05 18:51:07 +00:00
Adrian Prantl
41e92af7ae
Mangler: Add a DWARF-only mangling for type aliases that includes the
...
decl context of the type alias.
This implements <rdar://problem/15290346> "typealias sugar needs to be
mangled into debug info mangled type names".
Swift SVN r10749
2013-12-03 17:15:18 +00:00
Adrian Prantl
b0276bda79
Debug info: Emit the names of struct members when emitting their types.
...
I'm somewhat surprised no one complained about this before.
Swift SVN r10666
2013-11-22 22:17:43 +00:00
Adrian Prantl
7fca2d8142
Debug info: Encode the provenance of types imported from Objective-C in
...
the debug info.
<rdar://problem/15414884> Debug information must indicate location of Objective-C types
Swift SVN r10580
2013-11-20 03:38:21 +00:00
John McCall
f2edd610cb
Don't give IRGenDebugInfo privileged access to the TypeConverter.
...
Now that it's using the public routines for getting a TypeInfo,
make sure it's actually lowering types appropriately.
Swift SVN r10571
2013-11-20 00:14:19 +00:00
John McCall
20e58dcf93
Change the type of function values in SIL to SILFunctionType.
...
Perform major abstraction remappings in SILGen. Introduce
thunking functions as necessary to map between abstraction
patterns.
Swift SVN r10562
2013-11-19 22:55:09 +00:00
Adrian Prantl
459db73092
Debug info: Move the logic for emitting type metadata arguments to
...
GenProto, and emit both the mangled name and the type variable used by the
programmer for archetypes.
Fixes <rdar://problem/15346134> The $swift.type metadata arguments do not show up anymore
Swift SVN r9844
2013-10-31 04:50:33 +00:00
Adrian Prantl
ebeeebf116
Debug info: Reset the debug location after emitting the initial phi-node
...
locations for a more coherent line table. Relax testcase.
Swift SVN r9745
2013-10-28 23:14:45 +00:00
Adrian Prantl
5bbe0afb9f
Debug info: Properly handle the function prologue in the line table.
...
Introduces a new flag in SILLocation: InPrologue to mark instructions
that setup the stack and allocate storage for local variables/arguments.
Fixes rdar://problem/15290023: Breakpoint set on prologue - crash ensues.
Swift SVN r9686
2013-10-26 00:12:20 +00:00
Adrian Prantl
29ae59ee1c
Debug info: some refactoring to make emitVariableDeclaration more flexible.
...
Swift SVN r9608
2013-10-23 00:38:57 +00:00
Adrian Prantl
37a0827386
Debug info: fix a bug with indirect values by using enums for type-safety.
...
rdar://problem/15248201
Swift SVN r9463
2013-10-17 21:16:42 +00:00
Adrian Prantl
65dc82d530
Debug info: emit Archetypes and their conforming protocols.
...
Fixes rdar://problem/15209779 and rdar://problem/15211793.
Swift SVN r9422
2013-10-16 22:14:37 +00:00
Adrian Prantl
88e5426c71
Debug info: Line table: Calls to swift_releases should not jump to the
...
point where that memory was retained/allocated.
rdar://problem/15204469
Swift SVN r9235
2013-10-11 23:37:40 +00:00
Adrian Prantl
adc913b73c
Debug info: The end of the prologue should point to the opening brace.
...
Some refactoring the separate the needs of the line table versus decls.
rdar://problem/15204469
Swift SVN r9224
2013-10-11 22:15:10 +00:00
Adrian Prantl
c0df8ffecf
Bring swift up to sync with ToT LLVM. Please *upgrade both*.
...
Lookup types using a DITypeIdentifierMap.
Swift SVN r9175
2013-10-10 21:42:55 +00:00
Adrian Prantl
84f439735a
Make BumpAllocatedString a member of IRGenDebugInfo.
...
Swift SVN r9159
2013-10-10 18:47:03 +00:00
Adrian Prantl
41c63e2ebf
Debug info: Emit swift.type as a name alias $swift.type so the data
...
formatters can recognize is easily.
Swift SVN r9118
2013-10-10 00:47:00 +00:00
Adrian Prantl
23ca48185a
Debug info: Emit an artificial variable to describe type parameters.
...
Implements rdar://problem/14978875
Swift SVN r9097
2013-10-09 22:23:09 +00:00
John McCall
b880e60100
Remove SILFunctionTypeInfo in favor of SILFunctionType.
...
We still don't actually use this as a type, however.
Swift SVN r9091
2013-10-09 20:55:55 +00:00
Adrian Prantl
8808d48578
Debug info: emit captured variables in closures. rdar://problem/15035486
...
Swift SVN r8859
2013-10-02 22:46:03 +00:00
Adrian Prantl
61b5d055ef
Debug info: allow for boxed arguments. rdar://problem/15035486
...
Swift SVN r8713
2013-09-27 00:31:20 +00:00