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

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 15:13:37 PST 2016


mpividori created this revision.
mpividori added reviewers: kcc, zturner.
mpividori added a subscriber: llvm-commits.
mpividori set the repository for this revision to rL LLVM.

Repository:
  rL LLVM

https://reviews.llvm.org/D27229

Files:
  lib/Fuzzer/FuzzerDefs.h


Index: lib/Fuzzer/FuzzerDefs.h
===================================================================
--- lib/Fuzzer/FuzzerDefs.h
+++ 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.79651.patch
Type: text/x-patch
Size: 784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161129/51fda0c1/attachment.bin>


More information about the llvm-commits mailing list