Don't bother creating LabelBegin for .dwo units
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfCompileUnit.cpp
index 885be61b7c9414e03246a196432ed022637c5e2c..63cf62c03f948900aea8ce98e3fd09d2363aa238 100644 (file)
@@ -687,8 +687,9 @@ void DwarfCompileUnit::collectDeadVariables(DISubprogram SP) {
 }
 
 void DwarfCompileUnit::emitHeader(const MCSymbol *ASectionSym) const {
-  // Emit the compile units header.
-  Asm->OutStreamer.EmitLabel(LabelBegin);
+  // Don't bother labeling the .dwo unit, as its offset isn't used.
+  if (!Skeleton)
+    Asm->OutStreamer.EmitLabel(LabelBegin);
 
   DwarfUnit::emitHeader(ASectionSym);
 }