Sink DwarfUnit::applySubprogramAttributesToDefinition into DwarfCompileUnit
authorDavid Blaikie <dblaikie@gmail.com>
Sun, 2 Nov 2014 08:09:09 +0000 (08:09 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sun, 2 Nov 2014 08:09:09 +0000 (08:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221092 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h

index 630982aa514beb9fcf44d635ceb7b6e823f5680c..c691a2c261b3768cb2ed0c45846cb95bf575d352 100644 (file)
@@ -827,4 +827,12 @@ void DwarfCompileUnit::addExpr(DIELoc &Die, dwarf::Form Form,
   DIEValue *Value = new (DIEValueAllocator) DIEExpr(Expr);
   Die.addValue((dwarf::Attribute)0, Form, Value);
 }
   DIEValue *Value = new (DIEValueAllocator) DIEExpr(Expr);
   Die.addValue((dwarf::Attribute)0, Form, Value);
 }
+
+void DwarfCompileUnit::applySubprogramAttributesToDefinition(DISubprogram SP,
+                                                             DIE &SPDie) {
+  DISubprogram SPDecl = SP.getFunctionDeclaration();
+  DIScope Context = resolve(SPDecl ? SPDecl.getContext() : SP.getContext());
+  applySubprogramAttributes(SP, SPDie);
+  addGlobalName(SP.getName(), SPDie, Context);
+}
 } // end llvm namespace
 } // end llvm namespace
index 1052ef92327ecbd86f59d1c9403bcef573e91f0a..c7373b4a75b07f1783d938f616bcd38a72d90ee1 100644 (file)
@@ -214,6 +214,8 @@ public:
 
   /// Add a Dwarf expression attribute data and value.
   void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
 
   /// Add a Dwarf expression attribute data and value.
   void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
+
+  void applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie);
 };
 
 } // end llvm namespace
 };
 
 } // end llvm namespace
index 986be9c37f48739b14b0cf2f6555084627f7be9b..8a00f881c9677ddfdee3252e2634fdbf6b1932ce 100644 (file)
@@ -1257,13 +1257,6 @@ DIE *DwarfUnit::getOrCreateSubprogramDIE(DISubprogram SP) {
   return &SPDie;
 }
 
   return &SPDie;
 }
 
-void DwarfUnit::applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie) {
-  DISubprogram SPDecl = SP.getFunctionDeclaration();
-  DIScope Context = resolve(SPDecl ? SPDecl.getContext() : SP.getContext());
-  applySubprogramAttributes(SP, SPDie);
-  addGlobalName(SP.getName(), SPDie, Context);
-}
-
 void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) {
   DIE *DeclDie = nullptr;
   StringRef DeclLinkageName;
 void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) {
   DIE *DeclDie = nullptr;
   StringRef DeclLinkageName;
index cc9ae6fe6b3ff1b86f178b37d9aa9062c2e13404..32683c4ebfea28b427cc803dd7bd3f78de9331a4 100644 (file)
@@ -300,7 +300,6 @@ public:
   DIE *getOrCreateSubprogramDIE(DISubprogram SP);
 
   void applySubprogramAttributes(DISubprogram SP, DIE &SPDie);
   DIE *getOrCreateSubprogramDIE(DISubprogram SP);
 
   void applySubprogramAttributes(DISubprogram SP, DIE &SPDie);
-  void applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie);
 
   /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
   /// given DIType.
 
   /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
   /// given DIType.