From 93663b3c6226fb039aff10cc2edc3df51bf6bc23 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. llvm-svn: 141796 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 924ec844..aab513f 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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.1