]> granicus.if.org Git - llvm/commitdiff
[sanitizer-coverage] use IRB.SetCurrentDebugLocation after IRB.SetInsertPoint
authorKostya Serebryany <kcc@google.com>
Sat, 3 Dec 2016 01:43:30 +0000 (01:43 +0000)
committerKostya Serebryany <kcc@google.com>
Sat, 3 Dec 2016 01:43:30 +0000 (01:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288568 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/SanitizerCoverage.cpp

index 730e28a7f915c343f29a7c7df4883f0fd23a5f8c..8ef6be293d7892bde38e297d4ce6ef1b3ff08ab2 100644 (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.