diff options
author | Eric Christopher <echristo@apple.com> | 2011-11-08 21:56:23 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-11-08 21:56:23 +0000 |
commit | 74d8a87f40dd89ec263071c0af4d77104b166f4a (patch) | |
tree | c115455cfb4ab78536c4218e44d6745d1309f1a9 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 9cae2d2225ba58a70ef8ff057feab6873f4af520 (diff) |
Also add the linkage name to the name accelerator tables if it exists
and is different than the normal name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 660992a294..3d353b3b95 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -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; } |