DebugInfo: Pass MCSymbolRefExprs for labels instead of MCSymbols
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index a954eaea3f41f977df36a28b270fb57e06f1c682..ead90c05e0338f2046f12f29e582bb4e725da1a2 100644 (file)
@@ -1918,9 +1918,9 @@ void DwarfDebug::emitDIE(DIE *Die, std::vector<DIEAbbrev *> *Abbrevs) {
     case dwarf::DW_AT_location: {
       if (DIELabel *L = dyn_cast<DIELabel>(Values[i])) {
         if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
-          Asm->EmitLabelReference(L->getValue(), 4);
+          Asm->EmitLabelReference(&L->getValue()->getSymbol(), 4);
         else
-          Asm->EmitLabelDifference(L->getValue(), DwarfDebugLocSectionSym, 4);
+          Asm->EmitLabelDifference(&L->getValue()->getSymbol(), DwarfDebugLocSectionSym, 4);
       } else {
         Values[i]->EmitValue(Asm, Form);
       }