Commit Graph

1132 Commits

Author SHA1 Message Date
Adrian Prantl
2524f76e85 Debug Info: Rename builtin types. [cosmetic]
Swift SVN r7670
2013-08-28 17:25:38 +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
e96a3f64c6 Debug Info: Set the scope line of a subprogram to the beginning of a
function, except for pipeclosures.
Fixes rdar://problem/14798676.

Swift SVN r7529
2013-08-23 21:46:27 +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
966e9a1fa6 Update a comment.
Swift SVN r7469
2013-08-22 18:36:07 +00:00
Adrian Prantl
f808746917 Debug info: Remove an unneeded and wrong RAUW.
Swift SVN r7466
2013-08-22 18:35:59 +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
5993c92d14 Debug Info: Fix a bits vs bytes error.
Swift SVN r7423
2013-08-21 20:24:54 +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
7d759cc605 Debug Info: ignore property members that do not have any storage in the offset calculation.
Swift SVN r7371
2013-08-20 21:26:50 +00:00
Adrian Prantl
d1c1f4deee Debug info: Emit the appropriate encoding for builtin types.
Swift SVN r7232
2013-08-14 17:27:46 +00:00
Dmitri Hrybenko
13070a31bd SourceManager: make findBufferContainingLoc() always succeed.
Every valid source location corresponds to a source buffer.  There should be no
cases where we create a source location for a random string.  Thus,
findBufferContainingLoc() always succeeds.


Swift SVN r7120
2013-08-10 01:48:04 +00:00
Dmitri Hrybenko
8f7a437d44 Wrap a few functions from LLVM SourceMgr in preparation of making
SourceLoc::Value private


Swift SVN r7114
2013-08-09 23:15:59 +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
5831c1b1a3 Debug info: support chained typealiases.
Swift SVN r7026
2013-08-07 23:50:29 +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
a55b10ddbe Debug info: now with columns! This will be important since Swift is far
more compact and closures are ubiquitous.

Swift SVN r6944
2013-08-06 18:12:20 +00:00
Adrian Prantl
b5f8c40f45 Debug info: Add a testcase for closures. Ensure that closures are not
artificial.

Swift SVN r6928
2013-08-06 00:56:32 +00:00
Adrian Prantl
14c02dad7b Forgot to add the testcase for r6913.
Swift SVN r6920
2013-08-05 21:33:47 +00:00
Adrian Prantl
492a603560 Debug info: purge implicit closures from the linetable.
rdar://problem/14627460

Swift SVN r6915
2013-08-05 21:01:07 +00:00
Adrian Prantl
f416d78e68 Debug info: top_level_code is not an artificial function.
Swift SVN r6914
2013-08-05 21:01:04 +00:00
Adrian Prantl
e96e256b01 Debug Info: Include Pattern in the list of things that have a location.
Swift SVN r6874
2013-08-03 02:14:42 +00:00
Joe Groff
4316239f5d Kill Builtin.OpaquePointer.
It's not needed by SIL anymore.

Swift SVN r6873
2013-08-03 01:56:06 +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
Jordan Rose
c92fa28833 Have ImportDecl vend a separate "module path" and "decl path".
This makes it very clean to reason about which part should be used
to find a module to load, and which part should be used to filter
lookup within that module.

This breaks the old "import swift.print" syntax in favor of the new
"import func swift.print", but the new syntax is currently ignored.

Swift SVN r6849
2013-08-02 21:00:22 +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
2332517e36 Debug info: Fix an invalid pointer deref.
Swift SVN r6812
2013-08-01 18:47:58 +00:00
Jordan Rose
674a03b085 Replace "oneof" with "union"...everywhere.
We haven't fully updated references to union cases, and enums still are not
their own thing yet, but "oneof" is gone. Long live "union"!

Swift SVN r6783
2013-07-31 21:33:33 +00:00
Adrian Prantl
3313f8acbc Debug info: emit command line options.
Swift SVN r6778
2013-07-31 18:48:59 +00:00
Adrian Prantl
5abfdb74b7 Debug Info: Handle metatypes a little better.
Swift SVN r6777
2013-07-31 18:08:40 +00:00
Adrian Prantl
13d43602ba Debug info: Correct Bits vs Byte and add the bitsize to the testcases.
Swift SVN r6776
2013-07-31 18:08:39 +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
be3ba262b5 Debug info: Emit the human-readable name of a constructor as "constructor".
rdar://problem/14583186

Swift SVN r6748
2013-07-30 20:05:51 +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
2306563aa2 Debug info: emit the module name for types declare in a swiftmodule.
Swift SVN r6734
2013-07-30 01:17:02 +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
Adrian Prantl
8a0c1433f1 Fix a misuse of llvm::sys::path::append() and simplify string handling.
Swift SVN r6540
2013-07-24 01:13:22 +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
Jordan Rose
63f12548f6 [debug info] Fix null-terminated string issue with the fallback filename.
Since our modules currently have no source information, we're stuck using
the fallback filename for anything imported, including the standard library.
This makes variables.swift a little weaker, but there's not much we can do
about that. It's better than running off the end of a string, at least.

Swift SVN r6528
2013-07-23 23:10:31 +00:00
Adrian Prantl
3c9bb55b8d Debug Info: Emit the qualified names for many more ObjC-derived types.
This should get rid of most <null>-types in the DWARF output.

Swift SVN r6512
2013-07-23 21:35:21 +00:00
Adrian Prantl
8117a59e74 Debug Info: Change the default behavior for unhandled types to emit named
types instead of empty types.

Swift SVN r6511
2013-07-23 21:35:20 +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
23ca4447f0 Remove debug dump.
Swift SVN r6385
2013-07-19 20:19:18 +00:00