aboutsummaryrefslogtreecommitdiff
path: root/instrumentation
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-01-04 17:45:52 +0100
committervan Hauser <vh@thc.org>2021-01-04 17:45:52 +0100
commit9c15f53a47243e32860570d0b9fb64be3e12b0c5 (patch)
treecbc8c8736a69c1d9393f308acf85ed06cef68fa8 /instrumentation
parentb7af98e94561ebe44ea37304a357b00499d1104d (diff)
downloadAFLplusplus-9c15f53a47243e32860570d0b9fb64be3e12b0c5.tar.gz
fix for changes in llvm 12
Diffstat (limited to 'instrumentation')
-rw-r--r--instrumentation/SanitizerCoverageLTO.so.cc9
-rw-r--r--instrumentation/SanitizerCoveragePCGUARD.so.cc10
2 files changed, 3 insertions, 16 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc
index 82e55218..1d7ac934 100644
--- a/instrumentation/SanitizerCoverageLTO.so.cc
+++ b/instrumentation/SanitizerCoverageLTO.so.cc
@@ -1403,24 +1403,17 @@ void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
BasicBlock::iterator IP = BB.getFirstInsertionPt();
bool IsEntryBB = &BB == &F.getEntryBlock();
- DebugLoc EntryLoc;
+
if (IsEntryBB) {
- if (auto SP = F.getSubprogram())
- EntryLoc = DebugLoc::get(SP->getScopeLine(), 0, SP);
// Keep static allocas and llvm.localescape calls in the entry block. Even
// if we aren't splitting the block, it's nice for allocas to be before
// calls.
IP = PrepareToSplitEntryBlock(BB, IP);
- } else {
-
- EntryLoc = IP->getDebugLoc();
-
}
IRBuilder<> IRB(&*IP);
- IRB.SetCurrentDebugLocation(EntryLoc);
if (Options.TracePC) {
IRB.CreateCall(SanCovTracePC)
diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc
index 102b44a4..ecd6bc9b 100644
--- a/instrumentation/SanitizerCoveragePCGUARD.so.cc
+++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc
@@ -1163,24 +1163,18 @@ void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
BasicBlock::iterator IP = BB.getFirstInsertionPt();
bool IsEntryBB = &BB == &F.getEntryBlock();
- DebugLoc EntryLoc;
+
if (IsEntryBB) {
- if (auto SP = F.getSubprogram())
- EntryLoc = DebugLoc::get(SP->getScopeLine(), 0, SP);
// Keep static allocas and llvm.localescape calls in the entry block. Even
// if we aren't splitting the block, it's nice for allocas to be before
// calls.
IP = PrepareToSplitEntryBlock(BB, IP);
- } else {
-
- EntryLoc = IP->getDebugLoc();
-
}
IRBuilder<> IRB(&*IP);
- IRB.SetCurrentDebugLocation(EntryLoc);
+
if (Options.TracePC) {
IRB.CreateCall(SanCovTracePC);