about summary refs log tree commit diff
path: root/llvm_mode/afl-clang-fast.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-19 14:21:34 +0200
committervan Hauser <vh@thc.org>2020-06-19 14:21:34 +0200
commit2a254fce8fc63485b738a6bc895d36a091b0a6c6 (patch)
tree95aa068656e3bb6b9e38ac56386c5f0e99229e6c /llvm_mode/afl-clang-fast.c
parent758f136d3ec11ad9bff39643962a4f2320713a6a (diff)
downloadafl++-2a254fce8fc63485b738a6bc895d36a091b0a6c6.tar.gz
fix afl-clang-fast for default pcguard mode
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r--llvm_mode/afl-clang-fast.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 6604b57c..3b0225c2 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -39,6 +39,8 @@
 #include <limits.h>
 #include <assert.h>
 
+#include "llvm/Config/llvm-config.h"
+
 static u8 * obj_path;                  /* Path to runtime libraries         */
 static u8 **cc_params;                 /* Parameters passed to the real CC  */
 static u32  cc_par_cnt = 1;            /* Param count, including argv0      */
@@ -760,10 +762,10 @@ int main(int argc, char **argv, char **envp) {
 #if LLVM_VERSION_MAJOR <= 6
     instrument_mode = INSTRUMENT_AFL;
 #else
-  if (getenv("AFL_LLVM_WHITELIST"))
-    instrument_mode = INSTRUMENT_AFL;
-  else
-    instrument_mode = INSTRUMENT_PCGUARD;
+    if (getenv("AFL_LLVM_WHITELIST"))
+      instrument_mode = INSTRUMENT_AFL;
+    else
+      instrument_mode = INSTRUMENT_PCGUARD;
 #endif
 
   }