mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-13 08:35:46 +00:00
Add an assertion and prefer a crash over an infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6dc4d8f0ed
commit
61b4b8088d
@ -527,12 +527,15 @@ bool DISubprogram::Verify() const {
|
||||
while ((IA = DL.getInlinedAt()))
|
||||
DL = DebugLoc::getFromDILocation(IA);
|
||||
DL.getScopeAndInlinedAt(Scope, IA);
|
||||
assert(Scope && "debug location has no scope");
|
||||
assert(!IA);
|
||||
while (!DIDescriptor(Scope).isSubprogram()) {
|
||||
DILexicalBlockFile D(Scope);
|
||||
Scope = D.isLexicalBlockFile()
|
||||
? D.getScope()
|
||||
: DebugLoc::getFromDILexicalBlock(Scope).getScope();
|
||||
if (!Scope)
|
||||
llvm_unreachable("lexical block file has no scope");
|
||||
}
|
||||
if (!DISubprogram(Scope).describes(F))
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user