summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-10-17 16:15:48 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-10-17 16:15:48 +0000
commitb9fd902fdcbeeb04976a6acdc18afaa05335c79b (patch)
tree62077aaff07282da3dc205028215e8d552055143 /clang/lib/CodeGen/CodeGenModule.cpp
parent472175e545427ecb616318895be7d41897c788ce (diff)
downloadbcm5719-llvm-b9fd902fdcbeeb04976a6acdc18afaa05335c79b.tar.gz
bcm5719-llvm-b9fd902fdcbeeb04976a6acdc18afaa05335c79b.zip
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 1 insertions, 2 deletions
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);
}
}
OpenPOWER on IntegriCloud