DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variable
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 5611ae6fcd8034e1ea285b46ca7ce1802b1963d6..a2dc8c839c75f4cd3b845837286fa4ec176f19a0 100644 (file)
@@ -1156,7 +1156,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
     // The first mention of a function argument gets the CurrentFnBegin
     // label, so arguments are visible when breaking at function entry.
     const DILocalVariable *DIVar = Ranges.front().first->getDebugVariable();
-    if (DIVar->getTag() == dwarf::DW_TAG_arg_variable &&
+    if (DIVar->isParameter() &&
         getDISubprogram(DIVar->getScope())->describes(MF->getFunction())) {
       LabelsBeforeInsn[Ranges.front().first] = Asm->getFunctionBegin();
       if (Ranges.front().first->getDebugExpression()->isBitPiece()) {