diff options
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 2e8615219c8..a07a7c9e567 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -378,12 +378,13 @@ static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS, CommentOS << " ]"; } -static void printExtendedName(raw_ostream &OS, const MDLocalVariable *V) { +static void printExtendedName(raw_ostream &OS, const MDLocalVariable *V, + const MDLocation *DL) { const LLVMContext &Ctx = V->getContext(); StringRef Res = V->getName(); if (!Res.empty()) OS << Res << "," << V->getLine(); - if (auto *InlinedAt = V->getInlinedAt()) { + if (auto *InlinedAt = DL->getInlinedAt()) { if (DebugLoc InlinedAtDL = InlinedAt) { OS << " @["; printDebugLoc(InlinedAtDL, OS, Ctx); @@ -395,7 +396,7 @@ static void printExtendedName(raw_ostream &OS, const MDLocalVariable *V) { void UserValue::print(raw_ostream &OS, const TargetRegisterInfo *TRI) { DIVariable DV = cast<MDLocalVariable>(Variable); OS << "!\""; - printExtendedName(OS, DV); + printExtendedName(OS, DV, dl); OS << "\"\t"; if (offset) |