Commit Graph

180 Commits

Author SHA1 Message Date
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
Adrian Prantl
6009987432 Debug info: implement support for shadow-copied [byref] arguments.
This patch has a negative line balance -- those are my favorite!

Swift SVN r8655
2013-09-25 20:17:21 +00:00
Joe Groff
e109124186 Replace 'union' keyword with 'enum'.
This only touches the compiler and tests. Doc updates to follow.

Swift SVN r8478
2013-09-20 01:33:14 +00:00
Adrian Prantl
4b24197392 Reorganize includes.
Swift SVN r8450
2013-09-19 18:04:47 +00:00
Adrian Prantl
021bdd70d0 Debug info: emit the return type for main().
Lldb gets really confused otherwise.

Swift SVN r8430
2013-09-18 23:49:09 +00:00
Adrian Prantl
247b925ded Debug info: Implement bound generic unions properly.
Swift SVN r8363
2013-09-17 22:53:31 +00:00
Adrian Prantl
b80840dc97 Debug info: Implement function pointers. rdar://problem/14960518
Swift SVN r8267
2013-09-15 02:57:25 +00:00
Adrian Prantl
950f819603 Debug info: support protocol function arguments. rdar://problem/14978875
Swift SVN r8261
2013-09-15 01:26:17 +00:00
Adrian Prantl
5f7ea89fb1 Debug info: Boxed values need an extra deref.
Swift SVN r8226
2013-09-13 23:31:12 +00:00
Adrian Prantl
6fb78ed5e5 Debug info: Add initial support for boxed values on the heap.
Swift SVN r8221
2013-09-13 23:14:52 +00:00
Adrian Prantl
ba105c5705 Debug info: Emit byref parameter types as reference types.
Also scan store instructions for byref arguments.

Swift SVN r8209
2013-09-13 20:58:23 +00:00
Adrian Prantl
25f3bfe202 Debug info: Implement [byref] function arguments. rdar://problem/14949469
Swift SVN r8197
2013-09-13 16:03:45 +00:00
Adrian Prantl
46caf67a2d More cleanups: Someone implemented Size and Alignment while I wasn't looking :-)
Swift SVN r8121
2013-09-11 23:47:04 +00:00
Adrian Prantl
7433fec229 misc cleanup. No functionality change.
Swift SVN r8106
2013-09-11 20:53:18 +00:00
Adrian Prantl
46f616938c Debug info: Emit mangled name for bound generic structs and classes.
Implements rdar://problem/14802271

Swift SVN r8095
2013-09-11 17:58:54 +00:00
Adrian Prantl
af562d1696 Debug info: name mangling for composite types containing Archetypes.
Among other things this enables mangled names for tuples.
This adds a pointer to the DeclContext to SILFunction and which is used
to provide the necessary context to the Mangler.
Fixes rdar://problem/14808764 and rdar://problem/14813658.

Swift SVN r8070
2013-09-10 17:04:33 +00:00
Anna Zaks
e36839ca8a [IRGen] Eliminate calls to SILLocation() from IRGen.
Here, the location information does not have to always be available. Use Optional instead of creating an empty location.

Swift SVN r8055
2013-09-09 22:34:01 +00:00
Anna Zaks
cb43f56edb [SIL] Remove more dependancies on SILLocation(), specifically from debugging related code.
Swift SVN r8019
2013-09-06 23:57:30 +00:00
Anna Zaks
369a948248 [SIL] Minor auto-generated SILLocation API rename/refactor.
Swift SVN r8018
2013-09-06 23:57:27 +00:00
Adrian Prantl
07da340eef Move Dwarf constant definitions from lib/IrGen to include/basic.
Swift SVN r7850
2013-09-03 18:09:51 +00:00
Adrian Prantl
31c926660f Extend SerializedModuleLoader to load modules from a bitstream.
Add tools/lldb-moduleimport-test, which simulates LLDB importing modules
from the __apple_ast section in Mach-O files and use it to regression-test
the new API.

Swift SVN r7709
2013-08-29 00:57:05 +00:00
Adrian Prantl
9cacf75a8f Revert "Debug info: Class are passed by reference, make class args and local"
This reverts commit r7639.
Greg found out that we should not be doing this after all, since _all_ classes are references by definition.

Swift SVN r7692
2013-08-28 21:58:25 +00:00
Adrian Prantl
821fbb11db Debug info: Class are passed by reference, make class args and local
variables use a DW_op_deref expr.
Fixes <rdar://problem/14849106>

Swift SVN r7641
2013-08-27 22:48:26 +00:00
Anna Zaks
440631f86a [SIL] Add the SILLocation hierarchy.
Now we should be ready to start using these.

Swift SVN r7632
2013-08-27 22:16:18 +00:00
Adrian Prantl
cf4e28a70a Debug Info: Change the type caching to be based on the Type instead of
DebugTypeInfo. This is based off the observation that no two types that
share the same canonical type can have different storage and alignment
and has the benefit of being able to locate the debug info for a type
described by a meta type.

Swift SVN r7578
2013-08-26 17:55:14 +00:00
Adrian Prantl
e62fa5c07b Debug info: represent union types as union types instead of base types.
Swift SVN r7491
2013-08-22 23:26:15 +00:00
Adrian Prantl
6f7048c75a Debug Info: Reorganized and generalized the layout of the __apple_ast
section based on feedback from Greg.

Swift SVN r7443
2013-08-22 00:49:15 +00:00
Adrian Prantl
661315763a Debug Info: This patch implements the "emit modules when compiling -g"
proposal.
When compiling with debug info, build a swiftmodule that contains all the
type decls referenced by DWARF and emit it into a special __apple_swiftast
section in the .o file.

Swift SVN r7398
2013-08-21 01:07:30 +00:00
Adrian Prantl
aa11e4be55 Debug info: Add a swift -g test that runs the metadata verification in
LLVM and a bug uncovered by verifyer: Tuple elements should be member types.

Swift SVN r7113
2013-08-09 22:53:25 +00:00
Adrian Prantl
d00fe7e7dd Replace Twine with StringRef.
Swift SVN r7112
2013-08-09 22:53:24 +00:00
Dmitri Hrybenko
de59d8dcd4 Remove unneeded llvm:: qualifier for llvm::StringRef and llvm::SmallVector
Swift SVN r7089
2013-08-09 18:41:46 +00:00
Adrian Prantl
5e98accde4 Debug info: Rename createFunction -> emitFunction for consistency.
Swift SVN r7054
2013-08-08 21:20:07 +00:00
Adrian Prantl
bf436fd3cf Debug info: The age of DietDebugInfo(TM) is over. Here come sugared types!
Type aliases are represented as DW_TAG_typedef.

Swift SVN r6959
2013-08-06 22:50:18 +00:00
Adrian Prantl
8305b0229d Debug info: Emit the list of imported modules into DWARF. (They used to be
elided by the backend because they had no namespaces anchoring them).

Swift SVN r6858
2013-08-02 22:06:04 +00:00