Commit Graph

21 Commits

Author SHA1 Message Date
Adrian Prantl
e1749d245e Don't emit debug info for value witness tables.
Value witness tables have a well-known symbol name, so there is nothing
that the debug info adds on top of it.

On top of that, the DWARF type we previously were emitting them with was
bogus.

rdar://problem/21777112
2016-03-18 16:58:43 -07:00
Adrian Prantl
5726370c1a Debug Info: Improve the accuracy of enum elements' sizes within the
limitations of LLVM.
2016-03-10 10:13:51 -08:00
Dmitri Gribenko
65d840c0ae stdlib: lowercase cases in Optional and ImplicitlyUnwrappedOptional 2016-02-18 00:40:33 -08:00
Adrian Prantl
9b0d2cc8d6 Force generic enums to be instantiated in this testcase and unXFAIL it. 2015-12-10 17:11:53 -08:00
Slava Pestov
0a072484ec SILGen: Emit enum case constructors lazily
Now that we open-code enum construction, enum constructor entry points are
only needed when they are partially-applied, which is a rare case. So we
treat them like curry thunks and only emit them as needed.

The main consequence of this is that enum case constructors are no longer
part of our ABI.

To avoid a regression in the code path for diagnosing infinite value types,
force type lowering to walk a type when emitting its declaration, even if
there are no other references to the type in the program (which is now the
case for public enums which are otherwise not used).

Also XFAIL a DebugInfo test since it is not clear to me what the test does
or how to fix it. The obvious change of adding references to the enum
case constructor function to force it to be emitted did not work.
2015-12-10 16:39:48 -08:00
Joe Groff
2368ce774b Remove self types from mangling by default.
And include some supplementary mangling changes:

- Give the first generic param (depth=0, index=0) a single character mangling. Even after removing the self type from method declaration types, 'Self' still shows up very frequently in protocol requirement signatures.
- Fix the mangling of generic parameter counts to elide the count when there's only one parameter at the starting depth of the mangling.

Together these carve another 154KB out of a debug standard library. There's some awkwardness in demangled strings that I'll clean up in subsequent commits; since decl types now only mangle the number of generic params at their own depth, it's context-dependent what depths those represent, which we get wrong now. Currying markers are also wrong, but since free function currying is going away, we can mangle the partial application thunks in different ways.

Swift SVN r32896
2015-10-26 22:05:20 +00:00
Joe Groff
0cd5aa8c7c Change mangling for the Swift module from 'Ss' to 's'.
'Ss' appears in manglings tens of thousands of times in the standard library and is also incredibly frequent in other modules. This alone is enough to shrink the standard library by 59KB.

Swift SVN r32409
2015-10-02 22:39:44 +00:00
Michael Gottesman
6d74962918 Adapt all DebugInfo testcases to the new upstream LLVM metadata format.
Swift SVN r31813
2015-09-09 04:37:34 +00:00
Adrian Prantl
4f11ecc1da Get rid of Int in the debug info tests and preform some general cleanup.
<rdar://problem/20856296> Extinguish 'Int' from DebugInfo tests

Swift SVN r31177
2015-08-12 18:16:43 +00:00
Frederic Riss
f3816e6dfa DebugInfo: Do not infinite loop on indirect enums.
When computing the locations for local indirect enums, we could enter
an infinite loop if the first field is a recursive reference.
Just bail out of the field-splitting logic if we encounter an indirect
case. More work might be needed if indirect enums get exploded.

rdar://problem/21927941

Swift SVN r30717
2015-07-28 17:18:02 +00:00
Adrian Prantl
e91b59ff79 Debug Info: Also treat tuple types like all other composite types and
create a replaceable forward declaration while building it.
This fixes a crash when building generic enums a tuple element recursively
referenceing the enum.

rdar://problem/21326786

Swift SVN r29416
2015-06-17 00:36:05 +00:00
Adrian Prantl
44f78857f3 Debug Info: Treat subroutine types like all other composite types
and create a replaceable forward declaration while building it.
This fixes a crash when building generic enums with a constructor
function.

<rdar://problem/21294835>

Swift SVN r29411
2015-06-16 23:29:26 +00:00
Duncan Exon Smith
c6d42db070 Adapt to MD* => DI* renaming of debug info types
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE).  This is the
final step of rdar://problem/20434113.



Swift SVN r27925
2015-04-29 21:40:21 +00:00
Adrian Prantl
56e8ae7d82 Add missing testcase for r27562.
Swift SVN r27579
2015-04-22 15:57:37 +00:00
Adrian Prantl
3c6af3610a Debug Info: type-unique enum types by virtue of their mangled name.
rdar://problem/20015686

Swift SVN r26104
2015-03-13 18:13:59 +00:00
Duncan Exon Smith
093eb3c365 DebugInfo: Hand-update testcases after LLVM r231082
Update debug info testcases after moving the new hierarchy into place in
upstream LLVM r231082.

rdar://problem/19720042



Swift SVN r25715
2015-03-03 19:15:31 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Ted Kremenek
d075f06573 Require a minimum deployment target of iOS 7 or OSX 10.9
Implements <rdar://problem/17532113>

Swift SVN r19451
2014-07-02 06:23:38 +00:00
Adrian Prantl
f5325f9cf4 Debug Info: Do a marginally better job of supporting enums by emitting
the argument types and underlying raw types.
In the long run we'd really want to emit them as DW_TAG_variant_types.

<rdar://problem/14845818> Support enums

Swift SVN r18170
2014-05-16 03:51:08 +00:00