aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f7b4c09162..8cdb94c152 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2081,6 +2081,11 @@ void DwarfDebug::collectVariableInfo() {
// FIXME : Lift this restriction.
if (MInsn->getNumOperands() != 3)
continue;
+
+ // Ignore Undef values.
+ if (!MInsn->getOperand(0).getReg())
+ continue;
+
DIVariable DV(
const_cast<MDNode *>(MInsn->getOperand(MInsn->getNumOperands() - 1)
.getMetadata()));