diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.cpp b/llvm/lib/Fuzzer/FuzzerTracePC.cpp index d1f6441b6b27..c234f1602886 100644 --- a/llvm/lib/Fuzzer/FuzzerTracePC.cpp +++ b/llvm/lib/Fuzzer/FuzzerTracePC.cpp @@ -45,13 +45,6 @@ uintptr_t *TracePC::PCs() const { return __sancov_trace_pc_pcs; } -ATTRIBUTE_NO_SANITIZE_ALL -void TracePC::HandleTrace(uint32_t *Guard, uintptr_t PC) { - uint32_t Idx = *Guard; - __sancov_trace_pc_pcs[Idx] = PC; - __sancov_trace_pc_guard_8bit_counters[Idx]++; -} - size_t TracePC::GetTotalPCCoverage() { size_t Res = 0; for (size_t i = 1, N = GetNumPCs(); i < N; i++) @@ -289,7 +282,9 @@ ATTRIBUTE_INTERFACE ATTRIBUTE_NO_SANITIZE_ALL void __sanitizer_cov_trace_pc_guard(uint32_t *Guard) { uintptr_t PC = reinterpret_cast(__builtin_return_address(0)); - fuzzer::TPC.HandleTrace(Guard, PC); + uint32_t Idx = *Guard; + __sancov_trace_pc_pcs[Idx] = PC; + __sancov_trace_pc_guard_8bit_counters[Idx]++; } ATTRIBUTE_INTERFACE diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.h b/llvm/lib/Fuzzer/FuzzerTracePC.h index 1fbd0158b1df..8054aedbb0cf 100644 --- a/llvm/lib/Fuzzer/FuzzerTracePC.h +++ b/llvm/lib/Fuzzer/FuzzerTracePC.h @@ -49,7 +49,6 @@ class TracePC { public: static const size_t kNumPCs = 1 << 21; - void HandleTrace(uint32_t *guard, uintptr_t PC); void HandleInit(uint32_t *start, uint32_t *stop); void HandleCallerCallee(uintptr_t Caller, uintptr_t Callee); template void HandleCmp(uintptr_t PC, T Arg1, T Arg2);