diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2010-02-25 05:20:44 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2010-02-25 05:20:44 +0000 |
commit | 9ac3092d34ce15466236e01c3c000a350accee8b (patch) | |
tree | ebbb89b1187c102aef8d9c85d1a33ea0717f4a06 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 5a6872400becfcac3f89454b5b7ad3e520b55a1a (diff) | |
download | bcm5719-llvm-9ac3092d34ce15466236e01c3c000a350accee8b.tar.gz bcm5719-llvm-9ac3092d34ce15466236e01c3c000a350accee8b.zip |
Targets (like pic16) may have mangled the name of global variables,
so get the name from Var rather than the original decl.
llvm-svn: 97114
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 9ed6466af6a..0f3502e9bea 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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, |