From 7cdf9486015e6a220d60e999313c12110ee8a12f Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 13 Oct 2011 21:45:18 +0000 Subject: Recommit: Start handling debug line and scope information better: Migrate most of the location setting within the larger API in CGDebugInfo and update a lot of callers. Remove the existing file/scope change machinery in UpdateLineDirectiveRegion and replace it with DILexicalBlockFile usage. Finishes off the rest of rdar://10246360 after fixing a few bugs that were exposed in gdb testsuite testing. llvm-svn: 141893 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index aab513f..924ec844 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1392,10 +1392,8 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { EmitCXXGlobalVarDeclInitFunc(D, GV); // Emit global variable debug information. - if (CGDebugInfo *DI = getModuleDebugInfo()) { - DI->setLocation(D->getLocation()); + if (CGDebugInfo *DI = getModuleDebugInfo()) DI->EmitGlobalVariable(GV, D); - } } llvm::GlobalValue::LinkageTypes -- cgit v1.1