Commit Graph

10 Commits

Author SHA1 Message Date
Adrian Prantl
fcbebc51c7 [Debug Info] Emit -gdwarf-types debug info for Builtin.FixedArray<>
This commit also changes how specialized types are being emitted. Previously we
would not emitthe detailed member information in the specialized type itself,
and instead rely on the fact that it was present in the unspecialized type,
however, this wold prevent us from emitting any bound generic members, so we're
now emitting the members in both variants of the type.

This uncovered a with type aliases that this commit also addresses: Because we
don't canonicalize types prior to caching in order to preserve type sugar,
alternative representations of recursive types (with one or more levels of
recursion unfolded) could create potential infinite chains of types. This is
addressed by checking whether a sugared type has an already emitted canonical
representation first, and if yes, creating a typedef node pointing directly to
it.

The donwside of doing this is that it can lead to the disappearnce of type
aliases definitions when they are used as parameters in bound generic
types. However, we still preserve that a type was `MyClass<MyAlias>`. We just
might have a typedef pointing director from `MyClass<MyAlias>` ->
`MyClass<CanonicalType>`.

rdar://144315592
2025-02-14 12:19:58 -08:00
Adrian Prantl
248ba6236a Don't emit debug line numbers for Swift type forward declarations
These line numbers are consumed by LLDB and stored in the Declaration object,
but as far as I can tell no user-facing feature relies on this.

Removing the line number can reduce the churn for incremental builds
significantly, since whitespace changes in one file may trigger a recompilation
of any file that uses a type declared below the whitespace change.

<rdar://problem/63156560>
2020-05-13 16:57:44 -07:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Erik Eckstein
cd3d50a5d9 ABI: Change the mangling prefix from _T0 to $S 2018-01-06 13:55:59 -08:00
Adrian Prantl
8e6d6338ce Emit debug info for Swift types using the default alignment where possible.
This patch emits the alignment for all default-aligned types as 0
which causes the backend to not emit an alignment attribute at
all. This mirrors clang's behavior.

<rdar://problem/29007471>
2017-04-17 11:35:33 -07:00
Erik Eckstein
c4a11f4c92 tests: remove the now unused option -new-mangling-for-tests 2017-03-22 11:28:43 -07:00
Erik Eckstein
1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Saleem Abdulrasool
4d0b289440 test: correct DebugInfo test
Fix a test case which did not test what it thought it did.  The `-SAME-NOT`
suffix is not supported.  Make the test more strict to check the entire entry to
ensure that errant flags are not propagated instead.  This makes the test less
resilient to encoding changes, but ensures that the test performs the desired
check.  NFC.
2016-07-02 12:01:40 -07:00
Adrian Prantl
b4d3059051 Debug Info: Unique forward declarations generated for scopes and types.
This is mostly a cleanup and results slightly more efficient debug info.

rdar://problem/25965038
2016-07-01 12:03:39 -07:00