From: Kostya Serebryany Date: Sat, 3 Dec 2016 01:43:30 +0000 (+0000) Subject: [sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4732785cea25cc29c75b2cf40bf5ea4c20b619a8;p=llvm [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 --- diff --git a/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/lib/Transforms/Instrumentation/SanitizerCoverage.cpp index 730e28a7f91..8ef6be293d7 100644 --- a/lib/Transforms/Instrumentation/SanitizerCoverage.cpp +++ b/lib/Transforms/Instrumentation/SanitizerCoverage.cpp @@ -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.