From: Devang Patel Date: Sat, 7 Nov 2009 00:10:18 +0000 (+0000) Subject: Do not emit linkage name for global variables. It confuses gdb, because it picks... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0284fdc5855c21545c58f0fe8edd5a680e0b29ea;p=clang Do not emit linkage name for global variables. It confuses gdb, because it picks up AT_MIPS_linkage_name and ignores AT_name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86308 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 8f4aeb400a..e1d1c19e58 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1409,7 +1409,9 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, } DebugFactory.CreateGlobalVariable(getContext(Decl, Unit), - Name, Name, Name, Unit, LineNo, + Decl->getNameAsString(), + Decl->getNameAsString(), + NULL, Unit, LineNo, getOrCreateType(T, Unit), Var->hasInternalLinkage(), true/*definition*/, Var);