[llvm-commits] [llvm] r86753 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Devang Patel
dpatel at apple.com
Tue Nov 10 15:20:05 PST 2009
Author: dpatel
Date: Tue Nov 10 17:20:04 2009
New Revision: 86753
URL: http://llvm.org/viewvc/llvm-project?rev=86753&view=rev
Log:
Ignore variable if scope info is not available.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=86753&r1=86752&r2=86753&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Nov 10 17:20:04 2009
@@ -1453,7 +1453,8 @@
DIGlobalVariable GV(N);
if (GV.getContext().getNode() == SPNode) {
DIE *ScopedGVDie = CreateGlobalVariableDIE(ModuleCU, GV);
- SPDie->AddChild(ScopedGVDie);
+ if (ScopedGVDie)
+ SPDie->AddChild(ScopedGVDie);
}
}
return SPDie;
@@ -2076,7 +2077,9 @@
ConcreteScopes.lookup(ScopeLoc.getOrigLocation().getNode());
if (!Scope)
Scope = DbgScopeMap.lookup(ScopeLoc.getScope().getNode());
- assert (Scope && "Unable to find variable scope!");
+ // If variable scope is not found then skip this variable.
+ if (!Scope)
+ continue;
DbgVariable *RegVar = new DbgVariable(DV, VP.first);
Scope->AddVariable(RegVar);
More information about the llvm-commits
mailing list