From 5d822f06e84196c8bf80641d793d35e8cc7adb0e Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 29 Apr 2010 17:48:37 +0000 Subject: Use clang::VarDecl name instead of llvm::GlobalVariable name. llvm::GLobalVariable name may not match user visibile name for function static variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102644 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDebugInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGDebugInfo.cpp') diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 4991c0ff02..4963e73fe4 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1601,7 +1601,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, T = CGM.getContext().getConstantArrayType(ET, ConstVal, ArrayType::Normal, 0); } - llvm::StringRef DeclName = Var->getName(); + llvm::StringRef DeclName = D->getName(); llvm::DIDescriptor DContext = getContextDescriptor(dyn_cast(D->getDeclContext()), Unit); DebugFactory.CreateGlobalVariable(DContext, DeclName, -- cgit v1.2.3-18-g5258