Use clang::VarDecl name instead of llvm::GlobalVariable name.
llvm::GLobalVariable name may not match user visibile name for function static variables. llvm-svn: 102644
This commit is contained in:
@@ -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<Decl>(D->getDeclContext()), Unit);
|
||||
DebugFactory.CreateGlobalVariable(DContext, DeclName,
|
||||
|
||||
Reference in New Issue
Block a user