aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2010-02-25 05:20:44 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2010-02-25 05:20:44 +0000
commit67b14f0077d6cc508b933100d601ae8e6524b72f (patch)
treeb8c195a916aabea95e791fa4c078419c6de4f40b /lib/CodeGen/CGDebugInfo.cpp
parentcdfe268463ed743a5c258ed33490371b798733a1 (diff)
Targets (like pic16) may have mangled the name of global variables,
so get the name from Var rather than the original decl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 9ed6466af6..0f3502e9be 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1692,7 +1692,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
T = CGM.getContext().getConstantArrayType(ET, ConstVal,
ArrayType::Normal, 0);
}
- llvm::StringRef DeclName = D->getName();
+ llvm::StringRef DeclName = Var->getName();
llvm::DIDescriptor DContext =
getContextDescriptor(dyn_cast<Decl>(D->getDeclContext()), Unit);
DebugFactory.CreateGlobalVariable(DContext, DeclName,