Also add the linkage name to the name accelerator tables if it exists
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfCompileUnit.cpp
index 660992a2945793dd5a50076f7da33ad677abe45e..3d353b3b954835866c46034609e469ccb62da295 100644 (file)
@@ -1131,6 +1131,11 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
   if (addToAccelTable)
     addAccelName(GV.getName(), VariableDIE);
 
+  // If the linkage name is different than the name, go ahead and output
+  // that as well into the name table.
+  if (GV.getLinkageName() != "" && GV.getName() != GV.getLinkageName())
+    addAccelName(GV.getLinkageName(), VariableDIE);
+
   return;
 }