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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user