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
Dmitri Hrybenko
e1c4ae3174
Wrap llvm::SourceMgr in swift::SourceManager so that we can add new members
...
to the source manager.
Swift SVN r6815
2013-08-01 20:39:22 +00:00
Adrian Prantl
37ca2c3903
Debug info: Emit all imports into the IR.
...
Swift SVN r6813
2013-08-01 18:47:59 +00:00
Adrian Prantl
aecfb851cd
Wire clang::TargetInfo into swift::IRGenDebugInfo so we have access to
...
the target size of types, which may be different from the LLVM storage size.
Swift SVN r6774
2013-07-31 18:08:38 +00:00
Adrian Prantl
2c2ec20b3a
Debug Info: Push the current location before we create a new function,
...
because we often emit functions while in the middle of another function.
Swift SVN r6744
2013-07-30 18:21:06 +00:00
Adrian Prantl
5b5ba6d78a
Name mangling: Add a "_Tt" prefix to all type names that are output in
...
the debug info, to aid the debugger in figuring out the implementation
language of a given type in multi-language environments.
FYI, where applicable, we also emit the
DW_AT_APPLE_runtime_class(DW_AT_lang_Swift) attribute.
The demangler accepts type names with the "_Tt" prefix without the --type
switch.
Swift SVN r6714
2013-07-29 22:03:15 +00:00
Jordan Rose
611a8bd751
Revert "Debug Info: Add support for enum-style oneof types."
...
We're redesigning enums, and the current implementation isn't really
handled in the module format (since it uses the presence or absence of
a source location to decide if a oneof element is "enum-like"). We'll
just drop this from the debug info for now.
This reverts r6462 / 9ed7fb3e70ff2cb9f08524699e89643386e8b6e0.
Swift SVN r6529
2013-07-23 23:10:34 +00:00
Adrian Prantl
e54f9bc438
Debug Info: Add support for enum-style oneof types.
...
Swift SVN r6464
2013-07-22 20:21:05 +00:00
Adrian Prantl
400cf8050e
Debug Info: Implemented Tuples(!), Builtin*Pointer, BoundGenericClassType.
...
As a side effect compiling swift.swift with -g now works again.
Swift SVN r6398
2013-07-20 00:05:26 +00:00
Adrian Prantl
7ca6ac6f78
Debug Info: Implement a whole bunch of stubs for types that were not
...
handled before.
+ Several bug fixes for problems uncovered by the debug info verifier.
Swift SVN r6384
2013-07-19 20:12:47 +00:00
Chris Lattner
47dd7a4cf4
rename SIL internals for AllocVar and DeallocVar to [De]AllocStack.
...
No syntax change yet.
Swift SVN r6382
2013-07-19 19:38:29 +00:00
Adrian Prantl
11e5550847
Debug Info: Emit the fully-qualified, mangled name for nominal types.
...
Swift SVN r6371
2013-07-19 01:48:45 +00:00
Adrian Prantl
ca7c9cb95b
Debug Info: Represent function parameters as argument variables
...
instead of local variables.
Swift SVN r6298
2013-07-16 21:07:35 +00:00
Adrian Prantl
39cef650cd
Create parameter types with their actual size and alignment parameters
...
instead of hardcoded values.
Swift SVN r6297
2013-07-16 21:07:33 +00:00
Adrian Prantl
c8cb4d82b7
... and get rid of a bunch of dashes.
...
Swift SVN r6226
2013-07-12 23:23:19 +00:00
Adrian Prantl
241ccc5f49
s/@/\\/g
...
Swift SVN r6224
2013-07-12 23:18:44 +00:00
Adrian Prantl
3a0dd1d1ca
Debug info: Function types now include the types of the function parameters.
...
Swift SVN r6223
2013-07-12 23:05:03 +00:00
Adrian Prantl
ef84ad08e4
Add support for the "block" attribute.
...
Swift SVN r6222
2013-07-12 23:04:57 +00:00
Adrian Prantl
887dc7870a
Debug Info: Prepare everything for emitting he calling convention.
...
Swift SVN r6194
2013-07-12 00:44:18 +00:00
Adrian Prantl
945a481c33
Debug Info: Forge a name getters and setters using their parent declaration.
...
Fixes rdar://problem/14346129.
Swift SVN r6056
2013-07-08 18:27:36 +00:00
Adrian Prantl
303cef8c35
Allow for line tables to switch to a different file in the middle
...
of a lexical scope. This is not yet a proper inlined scope.
Swift SVN r6034
2013-07-06 00:20:38 +00:00
Adrian Prantl
6f526e3ca5
Make the line table more contiguous by reusing the last location if have
...
no line information but are still in the same scope.
Swift SVN r6033
2013-07-06 00:20:35 +00:00
Adrian Prantl
4a73ec14c9
Address a bunch of review comments. Thanks Joe & Chris!
...
Swift SVN r6012
2013-07-05 17:19:15 +00:00
Adrian Prantl
0c34b57c74
Debug Info: Add basic support for global and stack-allocated variables and
...
their types.
- DebugTypeInfo holds all type info we need to emit debug information.
- Type info is limited to name, location, and storage size.
- As a side-effect: verbose LLVM IR allocas in debug builds!
Swift SVN r5980
2013-07-03 23:02:04 +00:00
John McCall
90263437e4
Fix for case-sensitive filesystems.
...
Swift SVN r5957
2013-07-01 23:29:13 +00:00
Adrian Prantl
ae9bd9397b
Debug Info: Generate scope information for many more builtin/artificial functions.
...
Swift SVN r5876
2013-06-28 20:05:41 +00:00
Adrian Prantl
ceb32c281c
Debug Info: Attach (some of the) functions without sources to their scopes.
...
Various cleanups.
Swift SVN r5863
2013-06-28 00:52:07 +00:00
Adrian Prantl
de32b201d0
Debug Info: Add support for subprograms.
...
This means that single-stepping in lldb actually works now!
Swift SVN r5828
2013-06-27 00:46:30 +00:00
Dmitri Hrybenko
511bb60e62
Fix compile error with ToT clang
...
Swift SVN r5803
2013-06-25 20:59:06 +00:00
Adrian Prantl
5cf577282d
Debug Info: Wire up more compile unit metadata and clean up the code a bit.
...
Swift SVN r5794
2013-06-25 00:19:32 +00:00
Adrian Prantl
0f7533dc7e
Debug Info! Add basic support for line tables, compilation units, files,
...
and lexical scopes, which can be enabled through the new -g option.
When -g is enabled, line tables and scopes compile all the way
down to DWARF.
Changes to SIL:
- In addition to a SILLocation, every instruction now also has a pointer
to a SILDebugScope (its containing lexical scope).
- Added LexicalScope, which is to be used for all Scopes we want to show
up in the debug info.
Swift SVN r5772
2013-06-23 00:09:17 +00:00