[PATCH] D27229: [libFuzzer] Diff 1 - Add Macro Flags for Windows and Posix.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 08:43:09 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL288249: [LibFuzzer] Add macro flags for Posix and Windows. (authored by zturner).

Changed prior to commit:
  https://reviews.llvm.org/D27229?vs=79651&id=79751#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D27229

Files:
  llvm/trunk/lib/Fuzzer/FuzzerDefs.h


Index: llvm/trunk/lib/Fuzzer/FuzzerDefs.h
===================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerDefs.h
+++ llvm/trunk/lib/Fuzzer/FuzzerDefs.h
@@ -20,15 +20,23 @@
 
 // Platform detection.
 #ifdef __linux__
-#define LIBFUZZER_LINUX 1
 #define LIBFUZZER_APPLE 0
+#define LIBFUZZER_LINUX 1
+#define LIBFUZZER_WINDOWS 0
 #elif __APPLE__
-#define LIBFUZZER_LINUX 0
 #define LIBFUZZER_APPLE 1
+#define LIBFUZZER_LINUX 0
+#define LIBFUZZER_WINDOWS 0
+#elif _WIN32
+#define LIBFUZZER_APPLE 0
+#define LIBFUZZER_LINUX 0
+#define LIBFUZZER_WINDOWS 1
 #else
 #error "Support for your platform has not been implemented"
 #endif
 
+#define LIBFUZZER_POSIX LIBFUZZER_APPLE || LIBFUZZER_LINUX
+
 #ifdef __x86_64
 #define ATTRIBUTE_TARGET_POPCNT __attribute__((target("popcnt")))
 #else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27229.79751.patch
Type: text/x-patch
Size: 817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161130/78828437/attachment.bin>


More information about the llvm-commits mailing list