Merge pull request #27238 from adrian-prantl/silcloner-varinfo

Debug Info: Add missing debug info propagation to SILCloner.
This commit is contained in:
adrian-prantl
2019-09-24 16:48:35 -07:00
committed by GitHub
14 changed files with 85 additions and 36 deletions

View File

@@ -1315,14 +1315,18 @@ public:
/// arguments that are needed by DebugValueInst, DebugValueAddrInst,
/// AllocStackInst, and AllocBoxInst.
struct SILDebugVariable {
StringRef Name;
unsigned ArgNo : 16;
unsigned Constant : 1;
SILDebugVariable() : ArgNo(0), Constant(false) {}
SILDebugVariable(bool Constant, uint16_t ArgNo)
: ArgNo(ArgNo), Constant(Constant) {}
SILDebugVariable(StringRef Name, bool Constant, unsigned ArgNo)
: Name(Name), ArgNo(ArgNo), Constant(Constant) {}
StringRef Name;
unsigned ArgNo : 16;
unsigned Constant : 1;
bool operator==(const SILDebugVariable &V) {
return ArgNo == V.ArgNo && Constant == V.Constant && Name == V.Name;
}
};
/// A DebugVariable where storage for the strings has been