Commit Graph

766 Commits

Author SHA1 Message Date
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
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
Doug Gregor
71e8cf2da0 Fix compilation issue with top-of-tree LLVM
Swift SVN r6379
2013-07-19 16:16:41 +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
Greg Clayton
99220a099a Fix this file to compile on a case sensitive file system.
Swift SVN r6366
2013-07-19 00:15:23 +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
Anna Zaks
f6d1ec48f0 [SIL] Refactor SILLocation not to derive from PointerUnion3 but to include it as a member
As per Chris's suggestion (review of r6152), further refactored SILLocation not to derive from PointerUnion3 but to include it as a member.

In addition, added some template magic to make sure we don't have to chain dyn_casts, which I suspect will be/is happening a lot with SILLocation:
Ex:
-  if (auto E = Func.dyn_cast<Expr*>()) {
-    if (const FuncExpr *FE = dyn_cast<FuncExpr>(E))
-      return SILLocation(FE->getBody())
+  if (const FuncExpr *FE = Func.getAs<FuncExpr>())
+    return SILLocation(FE->getBody());

Swift SVN r6283
2013-07-16 01:50:29 +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
ceb3495ef0 DebugInfo: Add support for the [objc] attribute for classes.
Swift SVN r6168
2013-07-11 18:43:23 +00:00
Adrian Prantl
a4967ee9cc Debug Info: Represent classes as structure_types with their runtime
language set to "Swift".

Swift SVN r6144
2013-07-11 00:54:13 +00:00
Adrian Prantl
184db6484c Don't create a lexical block file for empty filenames.
Swift SVN r6063
2013-07-08 20:38:39 +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
dc0c502df4 Add a comment about how to emit the size of basic types.
Swift SVN r6051
2013-07-08 16:44:44 +00:00