From 28e06354b5d4dd539be6781e388ff27c0dffd807 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 12 Oct 2011 18:39:35 +0000 Subject: Revert file/scope handling patches. gdb testing revealed a couple of bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141796 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 924ec8448e..aab513fdce 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1392,8 +1392,10 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { EmitCXXGlobalVarDeclInitFunc(D, GV); // Emit global variable debug information. - if (CGDebugInfo *DI = getModuleDebugInfo()) + if (CGDebugInfo *DI = getModuleDebugInfo()) { + DI->setLocation(D->getLocation()); DI->EmitGlobalVariable(GV, D); + } } llvm::GlobalValue::LinkageTypes -- cgit v1.2.3-70-g09d2