summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 61cb46cb4bb..0319f256c6e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -910,7 +910,8 @@ static bool emitDebugLabelComment(const MachineInstr *MI, AsmPrinter &AP) {
OS << "DEBUG_LABEL: ";
const DILabel *V = MI->getDebugLabel();
- if (auto *SP = dyn_cast<DISubprogram>(V->getScope())) {
+ if (auto *SP = dyn_cast<DISubprogram>(
+ V->getScope()->getNonLexicalBlockFileScope())) {
StringRef Name = SP->getName();
if (!Name.empty())
OS << Name << ":";
OpenPOWER on IntegriCloud