make the SIL Printer print the var decl associated with a debug_value[_addr],

like this:
  debug_value %0 : $Int64  // let a               // id: %2



Swift SVN r12191
This commit is contained in:
Chris Lattner
2014-01-11 01:40:15 +00:00
parent 11d2e9282b
commit d82df1e073
3 changed files with 26 additions and 1 deletions

View File

@@ -632,11 +632,17 @@ public:
void visitDebugValueInst(DebugValueInst *DVI) {
OS << "debug_value " << getIDAndType(DVI->getOperand());
if (VarDecl *vd = DVI->getDecl())
OS << " // " << (vd->isLet() ? "let " : "var ") << vd->getName();
}
void visitDebugValueAddrInst(DebugValueAddrInst *DVAI) {
OS << "debug_value_addr " << getIDAndType(DVAI->getOperand());
}
if (VarDecl *vd = DVAI->getDecl())
OS << " // " << (vd->isLet() ? "let " : "var ") << vd->getName();
}
void visitLoadWeakInst(LoadWeakInst *LI) {
OS << "load_weak ";