mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-26 06:14:42 +00:00
[libFuzzer] record traces from the switch statements only when told to do so
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243768 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4a45f0871a
commit
207cfe14a9
@ -364,6 +364,7 @@ void TraceState::TraceCmpCallback(uintptr_t PC, size_t CmpSize, size_t CmpType,
|
|||||||
void TraceState::TraceSwitchCallback(uintptr_t PC, size_t ValSizeInBits,
|
void TraceState::TraceSwitchCallback(uintptr_t PC, size_t ValSizeInBits,
|
||||||
uint64_t Val, size_t NumCases,
|
uint64_t Val, size_t NumCases,
|
||||||
uint64_t *Cases) {
|
uint64_t *Cases) {
|
||||||
|
if (!RecordingTraces) return;
|
||||||
for (size_t i = 0; i < NumCases; i++)
|
for (size_t i = 0; i < NumCases; i++)
|
||||||
TryToAddDesiredData(Val, Cases[i], ValSizeInBits / 8);
|
TryToAddDesiredData(Val, Cases[i], ValSizeInBits / 8);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user