Commit Graph

1174 Commits

Author SHA1 Message Date
Doug Gregor
bc3f655105 s/constructor/init in a few more places.
Swift SVN r8504
2013-09-20 18:37:15 +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
06b76d4614 Put in a temporary hack for rdar://problem/15033772 while I investigate
the issue.

Swift SVN r8474
2013-09-20 00:07:31 +00:00
Adrian Prantl
2155d3d6b7 Debug info: Fix line table entries for implicit return statements.
rdar://problem/14981751

Swift SVN r8462
2013-09-19 20:30:54 +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
65bc68bc50 Debug info: Implment bound generic unions. Fixes rdar://problem/15014441.
Swift SVN r8376
2013-09-18 00:37:59 +00:00
Adrian Prantl
17f0ae8404 disable bound generic unions while I investigate rdar://problem/15014441.
Swift SVN r8364
2013-09-17 22:53:33 +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
9578dba12f Debug info: extract line and file from the decl.
Swift SVN r8356
2013-09-17 21:48:04 +00:00
Adrian Prantl
cd9c9e903d Debug info: Support [unowned] and [weak].
Swift SVN r8354
2013-09-17 21:28:15 +00:00
Adrian Prantl
cf04c4775c s/assert(false &&/llvm_unreachable(/
Swift SVN r8344
2013-09-17 18:51:29 +00:00
Adrian Prantl
ac23112e88 Debug info: Turn the warning about unsupported types into an error.
If this assertion fires it is because a new type was added, and I should
be implementing it.

Swift SVN r8342
2013-09-17 18:45:41 +00:00
Adrian Prantl
5f9f3b3776 Debug info: Implement initial support for UnboundGenericType,
PolymorphicFunctionType, BoundGenericUnion, BuiltinVector, SubstitutedType,
ParenType, OptionalType.

Swift SVN r8341
2013-09-17 18:45:39 +00:00
Dmitri Hrybenko
f1f189f4e0 Rename PipeClosureExpr -> ClosureExpr
Swift SVN r8321
2013-09-17 01:37:36 +00:00
Dmitri Hrybenko
b18c38a322 Rename ImplicitClosureExpr -> AutoClosureExpr
Swift SVN r8304
2013-09-16 23:03:50 +00:00
Adrian Prantl
650b75aeaa Debug info: emit mangled names for protocol compositions.
Swift SVN r8300
2013-09-16 22:10:11 +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
8369073cf9 Debug info: Emit protocols as DW_TAG_structure_types like everything else
(ideally we would use DW_TAG_interface_type, but LLVM doesn't support that
 yet).

Swift SVN r8263
2013-09-15 01:53:09 +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
Dmitri Hrybenko
536ed954ad Remove FuncExpr. Add CaptureInfo to FuncDecl. Introduce AnyFunctionRef.
AnyFunctionRef is a universal function reference that can wrap all AST nodes
that represent functions and exposes a common interface to them.  Use it in two
places in SIL where CapturingExpr was used previously.

AnyFunctionRef allows further simplifications in other places, but these will
be done separately.


Swift SVN r8239
2013-09-14 02:15:48 +00:00
Adrian Prantl
65f05625e7 Debug info: emit typedef types in the appropriate file scope.
Swift SVN r8233
2013-09-14 00:19:09 +00:00
Adrian Prantl
b117c942f9 Debug info: emit the names of [byref] arguments.
Swift SVN r8232
2013-09-14 00:19:08 +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
bd60314264 Safeguard against invalid scopes.
Swift SVN r8202
2013-09-13 16:59:56 +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
Dmitri Hrybenko
b6962656a3 Remove dead code in IR generation that handled FuncExpr
Swift SVN r8156
2013-09-12 20:20:44 +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
Anna Zaks
39b7a43cc0 [SIL] Mark locations of implicit constructors/destructors as auto-generated.
(Also, renames getArtificialLocation -> getAutoGeneratedLocation).

Swift SVN r8085
2013-09-10 22:52:43 +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
9bc6220ee1 Debug info: forgot to zero-terminate string.
Swift SVN r7769
2013-08-30 00:17:08 +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
c4d53aadd3 Debug Info: Make sure that top_level_code has a decl_file/decl_line.
Swift SVN r7675
2013-08-28 18:38:59 +00:00
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