This patch is primarily doing two things:
- Teach IRGen for some of the instructions to generate debug info based
on SILDebugVariable rather than AST node, which is not always
available when reading from SIL.
- Generate corresponding `llvm.dbg.*` intrinsics and `!DIExpression`
from the newly added SIL DIExpression.
Previously there was a mismatch between SIL's concept of a
struct (padding is implicit) and LLVM's (padding is explicit) in IRGen's
constant evaluator. The explicit padding fields need to be given a value
in the IR.
This patch also moves the (currently small) list of constant evaluation
functions into their own file.
Fixes SR-716.
When we have fixed offsets available for fields, emit them into the metadata or metadata pattern. If we don't, emit zero and leave it for the pattern fill function to resolve at runtime.
Swift SVN r9114
MemberRefExpr now uses ConcreteDeclRef to refer to its member, which
includes the substitutions and obviates the need for
GenericMemberRefExpr.
Swift SVN r7842
Split ExtractInst and ElementAddrInst into separate Tuple and Struct versions, and have the Struct versions reference struct member VarDecls directly instead of integer indices.
Swift SVN r5215
Implement ElementRefInst so that struct accessors work. Also extend SILConstant lowering to support constant_refs to constructors, destructors, and property accessors so that constructor and property accessor references work. (Constructors don't yet get visited by IRGenSIL, though.)
Swift SVN r3776