Don't bother creating LabelBegin for .dwo units
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfCompileUnit.h
index c9b365c6ce269d93632c95ae577514c528df1f47..27ed6fc1431816ca7f14e99d76a96e3690002948 100644 (file)
@@ -144,22 +144,6 @@ public:
 
   void collectDeadVariables(DISubprogram SP);
 
-  /// If there's a skeleton then return the begin label for the skeleton unit,
-  /// otherwise return the local label for this unit.
-  MCSymbol *getLocalLabelBegin() const {
-    if (Skeleton)
-      return Skeleton->getLabelBegin();
-    return getLabelBegin();
-  }
-
-  /// If there's a skeleton then return the section symbol for the skeleton
-  /// unit, otherwise return the section symbol for this unit.
-  MCSymbol *getLocalSectionSym() const {
-    if (Skeleton)
-      return Skeleton->getSectionSym();
-    return getSectionSym();
-  }
-
   /// Set the skeleton unit associated with this unit.
   void setSkeleton(DwarfCompileUnit &Skel) { Skeleton = &Skel; }
 
@@ -174,8 +158,11 @@ public:
   void initSection(const MCSection *Section, MCSymbol *SectionSym) {
     DwarfUnit::initSection(Section);
     this->SectionSym = SectionSym;
-    LabelBegin =
-        Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID());
+
+    // Don't bother labeling the .dwo unit, as its offset isn't used.
+    if (!Skeleton)
+      LabelBegin =
+          Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID());
   }
 
   unsigned getLength() {