mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
SanitizerCoverage: Check for null DebugLocs
After a WIP patch to make `DIDescriptor` accessors more strict, this started asserting. llvm-svn: 232832
This commit is contained in:
parent
0ad4b0624b
commit
c31f1b0224
@ -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…
Reference in New Issue
Block a user