summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-10-12 18:39:35 +0000
committerEric Christopher <echristo@apple.com>2011-10-12 18:39:35 +0000
commit28e06354b5d4dd539be6781e388ff27c0dffd807 (patch)
tree6e224a320ad39dcab3b12a05e16bd4a6c97d162e /lib/CodeGen/CodeGenModule.cpp
parentd596c4d3f8931f4d479e965bf46d0e7edad85570 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp4
1 files changed, 3 insertions, 1 deletions
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