[libFuzzer] ensure that DFT and autofocus works for C++ (mangled) functions
llvm-svn: 363905
diff --git a/compiler-rt/test/fuzzer/OnlySomeBytesTest.cpp b/compiler-rt/test/fuzzer/OnlySomeBytesTest.cpp
index d60cf3e..640e00a 100644
--- a/compiler-rt/test/fuzzer/OnlySomeBytesTest.cpp
+++ b/compiler-rt/test/fuzzer/OnlySomeBytesTest.cpp
@@ -15,13 +15,13 @@
static volatile int one = 1;
-extern "C" {
__attribute__((noinline)) void bad() {
fprintf(stderr, "BINGO\n");
if (one)
abort();
}
+extern "C"
__attribute__((noinline)) void f0(IN in) {
uint32_t x = in[5] + 251 * in[7] + 251 * 251 * in[9];
if (x == 'F' + 251 * 'U' + 251 * 251 * 'Z') {
@@ -41,8 +41,6 @@
__attribute__((noinline)) void fB(IN in) { if (in[1] == 'B') fC(in); }
__attribute__((noinline)) void fA(IN in) { if (in[0] == 'A') fB(in); }
-} // extern "C"
-
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (Size < N) return 0;
fA((IN)Data);