From b9fd902fdcbeeb04976a6acdc18afaa05335c79b 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. llvm-svn: 57684 --- clang/lib/CodeGen/CodeGenModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a74f0578a5b..a8d8825aea8 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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