[sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2016-12-03 01:43:30 +00:00
parent 5bfd3196df
commit 4732785cea

View File

@ -705,8 +705,8 @@ void SanitizerCoverageModule::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
GuardLoad, Constant::getNullValue(GuardLoad->getType()));
auto Ins = SplitBlockAndInsertIfThen(
Cmp, &*IP, false, MDBuilder(*C).createBranchWeights(1, 100000));
IRB.SetCurrentDebugLocation(EntryLoc);
IRB.SetInsertPoint(Ins);
IRB.SetCurrentDebugLocation(EntryLoc);
}
IRB.CreateCall(SanCovTracePCGuard, GuardPtr);
IRB.CreateCall(EmptyAsm, {}); // Avoids callback merge.