Remove DwarfUnit::LabelEnd in favor of computing the length of the section directly
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index bbac4794aad697ff0f4394e37b9760a87b6f4ded..ce59debe2355951f4e96de445ba67788266acd40 100644 (file)
@@ -1598,7 +1598,7 @@ void DwarfDebug::emitDebugPubSection(
     Asm->EmitSectionOffset(TheU->getLabelBegin(), TheU->getSectionSym());
 
     Asm->OutStreamer.AddComment("Compilation Unit Length");
-    Asm->EmitLabelDifference(TheU->getLabelEnd(), TheU->getLabelBegin(), 4);
+    Asm->EmitInt32(TheU->getLength());
 
     // Emit the pubnames for this compilation unit.
     for (const auto &GI : Globals) {