mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-29 16:41:27 +00:00
[IR/Diagnostic] Assert that DebugLoc is valid before accessing.
PR: 23380 Differential Revision: http://reviews.llvm.org/D9464 Reviewed by: dexonsmith llvm-svn: 236435
This commit is contained in:
parent
8d8146fa73
commit
e197d4fbb6
@ -136,6 +136,7 @@ void DiagnosticInfoOptimizationBase::getLocation(StringRef *Filename,
|
||||
unsigned *Line,
|
||||
unsigned *Column) const {
|
||||
DILocation *L = getDebugLoc();
|
||||
assert(L != nullptr && "debug location is invalid");
|
||||
*Filename = L->getFilename();
|
||||
*Line = L->getLine();
|
||||
*Column = L->getColumn();
|
||||
|
Loading…
Reference in New Issue
Block a user