diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/Interp/Function.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/AST/Interp/Function.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/Interp/Function.cpp b/contrib/llvm-project/clang/lib/AST/Interp/Function.cpp index 1d04998d5dd1..00f5a1fced53 100644 --- a/contrib/llvm-project/clang/lib/AST/Interp/Function.cpp +++ b/contrib/llvm-project/clang/lib/AST/Interp/Function.cpp @@ -40,7 +40,8 @@ SourceInfo Function::getSource(CodePtr PC) const { unsigned Offset = PC - getCodeBegin(); using Elem = std::pair<unsigned, SourceInfo>; auto It = llvm::lower_bound(SrcMap, Elem{Offset, {}}, llvm::less_first()); - assert(It != SrcMap.end()); + if (It == SrcMap.end()) + return SrcMap.back().second; return It->second; } |