[libFuzzer] fix non-linux build
authorKostya Serebryany <kcc@google.com>
Thu, 23 Mar 2017 23:48:47 +0000 (23:48 +0000)
committerKostya Serebryany <kcc@google.com>
Thu, 23 Mar 2017 23:48:47 +0000 (23:48 +0000)
llvm-svn: 298666

llvm/lib/Fuzzer/test/TableLookupTest.cpp

index 165afdb..f9d5610 100644 (file)
@@ -22,7 +22,9 @@ const size_t N = 1 << 12;
 // Use either `Counters[Idx] = 1` or `Counters[Idx]++;`
 // depending on whether multiple occurrences of the event 'Idx'
 // is important to distinguish from one occurrence.
+#ifdef __linux__
 alignas(64) __attribute__((section("__libfuzzer_extra_counters")))
+#endif
 static uint8_t Counters[N];
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {