From 66031a5594bc9a7dc0dc5137c3e7955f835e4639 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 17 Oct 2008 16:15:48 +0000 Subject: Change CGDebugInfo::setLocation to just ignore invalid locations. This simplifies clients. Also, add assert that RegionStack is empty when the CGDebugInfo is destroyed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57684 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index a74f0578a5..a8d8825aea 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -615,8 +615,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) { // Emit global variable debug information. CGDebugInfo *DI = getDebugInfo(); if(DI) { - if(D->getLocation().isValid()) - DI->setLocation(D->getLocation()); + DI->setLocation(D->getLocation()); DI->EmitGlobalVariable(GV, D); } } -- cgit v1.2.3-18-g5258