mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
SanitizerCoverage: Check for null DebugLocs
After a WIP patch to make `DIDescriptor` accessors more strict, this started asserting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
11053bd878
commit
14d8dbd37d
@ -329,8 +329,9 @@ void SanitizerCoverageModule::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
|
||||
}
|
||||
|
||||
bool IsEntryBB = &BB == &F.getEntryBlock();
|
||||
DebugLoc EntryLoc =
|
||||
IsEntryBB ? IP->getDebugLoc().getFnDebugLoc(*C) : IP->getDebugLoc();
|
||||
DebugLoc EntryLoc = IsEntryBB && !IP->getDebugLoc().isUnknown()
|
||||
? IP->getDebugLoc().getFnDebugLoc(*C)
|
||||
: IP->getDebugLoc();
|
||||
IRBuilder<> IRB(IP);
|
||||
IRB.SetCurrentDebugLocation(EntryLoc);
|
||||
SmallVector<Value *, 1> Indices;
|
||||
|
Loading…
x
Reference in New Issue
Block a user