]> granicus.if.org Git - clang/commitdiff
Remember to set the location in EmitGlobalVariable to the current decl
authorEric Christopher <echristo@apple.com>
Wed, 12 Oct 2011 01:11:30 +0000 (01:11 +0000)
committerEric Christopher <echristo@apple.com>
Wed, 12 Oct 2011 01:11:30 +0000 (01:11 +0000)
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

lib/CodeGen/CGDebugInfo.cpp

index d074838a36822fa6f644fc1ce7c922d65e1b4f87..120486dbe27ab3ca769e320cd296614bbaf76d68 100644 (file)
@@ -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()) {