From: Eric Christopher Date: Wed, 12 Oct 2011 01:11:30 +0000 (+0000) Subject: Remember to set the location in EmitGlobalVariable to the current decl X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6bfbca5733f1fc090b2149c4fff0548f1f15526;p=clang Remember to set the location in EmitGlobalVariable to the current decl if we're going to delete the setLocation as we did in 141732. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141762 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index d074838a36..120486dbe2 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2303,6 +2303,8 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, llvm::DIFile Unit = getOrCreateFile(D->getLocation()); unsigned LineNo = getLineNumber(D->getLocation()); + setLocation(D->getLocation()); + QualType T = D->getType(); if (T->isIncompleteArrayType()) {