mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-02 10:33:53 +00:00
[IR/Diagnostic] Assert that DebugLoc is valid before accessing.
PR: 23380 Differential Revision: http://reviews.llvm.org/D9464 Reviewed by: dexonsmith git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236435 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
375079a549
commit
de7e17f65a
@ -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…
x
Reference in New Issue
Block a user