[llvm] r298666 - [libFuzzer] fix non-linux build

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 16:48:48 PDT 2017


Author: kcc
Date: Thu Mar 23 18:48:47 2017
New Revision: 298666

URL: http://llvm.org/viewvc/llvm-project?rev=298666&view=rev
Log:
[libFuzzer] fix non-linux build

Modified:
    llvm/trunk/lib/Fuzzer/test/TableLookupTest.cpp

Modified: llvm/trunk/lib/Fuzzer/test/TableLookupTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/TableLookupTest.cpp?rev=298666&r1=298665&r2=298666&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/TableLookupTest.cpp (original)
+++ llvm/trunk/lib/Fuzzer/test/TableLookupTest.cpp Thu Mar 23 18:48:47 2017
@@ -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) {




More information about the llvm-commits mailing list