diff options
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerTracePC.h')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerTracePC.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.h b/llvm/lib/Fuzzer/FuzzerTracePC.h index ad832d7b2d4..d5d2985d62c 100644 --- a/llvm/lib/Fuzzer/FuzzerTracePC.h +++ b/llvm/lib/Fuzzer/FuzzerTracePC.h @@ -133,6 +133,13 @@ class TracePC { } uintptr_t GetMaxStackOffset() const { return InitialStack - LowestStack; } + template<class CallBack> + void ForEachObservedPC(CallBack CB) { + if (ObservedPCs) + for (auto PC : *ObservedPCs) + CB(PC); + } + private: bool UseCounters = false; bool UseValueProfile = false; |