When emitting debug info that references into a macro expansion, dump
the macro expansion buffer into a file on disk (in the temporary
directory) so that one can see the macro expansion buffers in the
source files themselves.
The test here validates that the generated LLVM IR looks correct, but
I'm having a problem getting LLDB to actually locate the source code
correctly.
Although the declaration of macros doesn't appear in Swift source code
that uses macros, they still operate as declarations within the
language. Rework `Macro` as `MacroDecl`, a generic value declaration,
which appropriate models its place in the language.
The vast majority of this change is in extending all of the various
switches on declaration kinds to account for macros.
Since I am beginning to prepare for adding real move only types to the language,
I am renaming everything that has to do with copyable types "move only wrapped"
values instead of move only. The hope is this reduces/prevents any confusion in
between the two.
The function prologue of async funclets inherits its source location
from the hop_to_executor instruction. This makes it easier to produce
logical backtraces, since the PC in logical frames will always point
to the start if the function.
rdar://89776340
This reduces the size of the debug info of (random benchmark)
_StringProcessing.o by 1600 bytes. Modules with more arithmetic should
benefit more.
rdar://94060085
Not sure which LLVM commit added an `#undef` for `DEBUG_TYPE` in a header
transitively included by these files, but it doesn't seem uncommon
for headers to define and undefine their own `DEBUG_TYPE`.
Move `#define DEBUG_TYPE` after the includes to prevent it being
undefined.
This uses the previous simple dominance dbg info propagation implementation in
the previous commit.
I fix in the next commit the debug info for the last move/reinit in the var
test.
Improvement upon #41645 to emit the async suspend dispatch thunk's debug
info with the `linkageName` of the containing function of the async
await.
rdar://88579737
This fixes the issues I was in my earlier PR about seeing with vars not getting
appropriate debug info when moved. Now we get the right debug info and in the
dwarf can see the two live ranges of our moved value as we hoped for.
NOTE: I disabled alloc stack hoisting on move_function_debuginfo.swift since it
can result in us eliminating debug info at -Onone when we merge alloc_stack. I
am preparing a separate patch that fixes that issue but hit a lldb problem. This
unblocks this PR from that change since they are not /actually/ related.
Nested archetypes are represented by their base archetype kinds (primary,
opened, or opaque type) with an interface type that is a nested type,
as represented by a DependentMemberType. This provides a more uniform
representation of archetypes throughout the frontend.
`ArchetypeType` has all of the API we need for these cases, so use
that instead to isolate us from `NestedArchetypeType`, which we would
like to eliminate soon-ish.
explicit ExistentialType.
The ASTDemangler needs to produce ExistentialType based on context, not
unconditionally when producing a protocol composition. This is tricky
because existential types are mangled the same way as other protocol
references, e.g. in conformance requirements. For now, drop the explicit
existentials when reconstructing types.
by using the proper API. The old code produced the address of the hash. This
fixes a warning printed by LLDB and dsymutil about module hash mismatches and
makes the build build products more deterministic.
rdar://77344315