Migrate addGlobalName to the .cpp file as an intermediate step
to further work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191113 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 2638b31..fe4a729 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -843,6 +843,11 @@
addGlobalType(Ty);
}
+/// addGlobalName - Add a new global name to the compile unit.
+void CompileUnit::addGlobalName(StringRef Name, DIE *Die) {
+ GlobalNames[Name] = Die;
+}
+
/// addGlobalType - Add a new global type to the compile unit.
///
void CompileUnit::addGlobalType(DIType Ty) {
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index ecffb25..980ebc8 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -129,13 +129,12 @@
/// addGlobalName - Add a new global entity to the compile unit.
///
- void addGlobalName(StringRef Name, DIE *Die) { GlobalNames[Name] = Die; }
+ void addGlobalName(StringRef Name, DIE *Die);
/// addGlobalType - Add a new global type to the compile unit.
///
void addGlobalType(DIType Ty);
-
/// addAccelName - Add a new name to the name accelerator table.
void addAccelName(StringRef Name, DIE *Die) {
std::vector<DIE*> &DIEs = AccelNames[Name];