summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 5dff50d362f..76836fd9551 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -536,7 +536,8 @@ bool DISubprogram::Verify() const {
Scope = D.isLexicalBlockFile()
? D.getScope()
: DebugLoc::getFromDILexicalBlock(Scope).getScope();
- assert(Scope && "lexical block file has no scope");
+ if (!Scope)
+ return false;
}
if (!DISubprogram(Scope).describes(F))
return false;
OpenPOWER on IntegriCloud