about summary refs log tree commit diff
path: root/llvm_mode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/LLVMInsTrim.so.cc26
-rw-r--r--llvm_mode/MarkNodes.cc4
-rw-r--r--llvm_mode/afl-llvm-common.h8
-rw-r--r--llvm_mode/afl-llvm-pass.so.cc16
-rw-r--r--llvm_mode/afl-llvm-rt.o.c24
-rw-r--r--llvm_mode/cmplog-instructions-pass.cc10
-rw-r--r--llvm_mode/cmplog-routines-pass.cc10
-rw-r--r--llvm_mode/compare-transform-pass.so.cc10
-rw-r--r--llvm_mode/split-compares-pass.so.cc10
-rw-r--r--llvm_mode/split-switches-pass.so.cc10
10 files changed, 64 insertions, 64 deletions
diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc
index 69fc079b..a072ae55 100644
--- a/llvm_mode/LLVMInsTrim.so.cc
+++ b/llvm_mode/LLVMInsTrim.so.cc
@@ -12,13 +12,13 @@ typedef long double max_align_t;
 #include "llvm/ADT/DenseSet.h"
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/CFG.h"
-#include "llvm/IR/Dominators.h"
-#include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/CFG.h"
+#  include "llvm/IR/Dominators.h"
+#  include "llvm/IR/DebugInfo.h"
 #else
-#include "llvm/Support/CFG.h"
-#include "llvm/Analysis/Dominators.h"
-#include "llvm/DebugInfo.h"
+#  include "llvm/Support/CFG.h"
+#  include "llvm/Analysis/Dominators.h"
+#  include "llvm/DebugInfo.h"
 #endif
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/Instructions.h"
@@ -97,7 +97,7 @@ struct InsTrim : public ModulePass {
 
 #if LLVM_VERSION_MAJOR >= 4 || \
     (LLVM_VERSION_MAJOR == 4 && LLVM_VERSION_PATCH >= 1)
-#define AFL_HAVE_VECTOR_INTRINSICS 1
+#  define AFL_HAVE_VECTOR_INTRINSICS 1
 #endif
 
   bool runOnModule(Module &M) override {
@@ -137,13 +137,13 @@ struct InsTrim : public ModulePass {
         getenv("AFL_LLVM_SKIPSINGLEBLOCK"))
       function_minimum_size = 2;
 
-    unsigned PrevLocSize = 0;
-    char *   ngram_size_str = getenv("AFL_LLVM_NGRAM_SIZE");
+    unsigned int PrevLocSize = 0;
+    char *       ngram_size_str = getenv("AFL_LLVM_NGRAM_SIZE");
     if (!ngram_size_str) ngram_size_str = getenv("AFL_NGRAM_SIZE");
     char *ctx_str = getenv("AFL_LLVM_CTX");
 
 #ifdef AFL_HAVE_VECTOR_INTRINSICS
-    int ngram_size = 0;
+    unsigned int ngram_size = 0;
     /* Decide previous location vector size (must be a power of two) */
     VectorType *PrevLocTy;
 
@@ -196,17 +196,17 @@ struct InsTrim : public ModulePass {
 
 #ifdef AFL_HAVE_VECTOR_INTRINSICS
     if (ngram_size)
-#ifdef __ANDROID__
+#  ifdef __ANDROID__
       AFLPrevLoc = new GlobalVariable(
           M, PrevLocTy, /* isConstant */ false, GlobalValue::ExternalLinkage,
           /* Initializer */ nullptr, "__afl_prev_loc");
-#else
+#  else
       AFLPrevLoc = new GlobalVariable(
           M, PrevLocTy, /* isConstant */ false, GlobalValue::ExternalLinkage,
           /* Initializer */ nullptr, "__afl_prev_loc",
           /* InsertBefore */ nullptr, GlobalVariable::GeneralDynamicTLSModel,
           /* AddressSpace */ 0, /* IsExternallyInitialized */ false);
-#endif
+#  endif
     else
 #endif
 #ifdef __ANDROID__
diff --git a/llvm_mode/MarkNodes.cc b/llvm_mode/MarkNodes.cc
index cff6c90a..66e6a728 100644
--- a/llvm_mode/MarkNodes.cc
+++ b/llvm_mode/MarkNodes.cc
@@ -15,9 +15,9 @@ typedef long double max_align_t;
 #include "llvm/IR/BasicBlock.h"
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/CFG.h"
+#  include "llvm/IR/CFG.h"
 #else
-#include "llvm/Support/CFG.h"
+#  include "llvm/Support/CFG.h"
 #endif
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/Function.h"
diff --git a/llvm_mode/afl-llvm-common.h b/llvm_mode/afl-llvm-common.h
index cf14d2e1..c0982e10 100644
--- a/llvm_mode/afl-llvm-common.h
+++ b/llvm_mode/afl-llvm-common.h
@@ -25,11 +25,11 @@ typedef long double max_align_t;
 
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/DebugInfo.h"
-#include "llvm/IR/CFG.h"
+#  include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/CFG.h"
 #else
-#include "llvm/DebugInfo.h"
-#include "llvm/Support/CFG.h"
+#  include "llvm/DebugInfo.h"
+#  include "llvm/Support/CFG.h"
 #endif
 
 char *                 getBBName(const llvm::BasicBlock *BB);
diff --git a/llvm_mode/afl-llvm-pass.so.cc b/llvm_mode/afl-llvm-pass.so.cc
index 2d23ad21..2bcd661b 100644
--- a/llvm_mode/afl-llvm-pass.so.cc
+++ b/llvm_mode/afl-llvm-pass.so.cc
@@ -54,11 +54,11 @@ typedef long double max_align_t;
 
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/DebugInfo.h"
-#include "llvm/IR/CFG.h"
+#  include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/CFG.h"
 #else
-#include "llvm/DebugInfo.h"
-#include "llvm/Support/CFG.h"
+#  include "llvm/DebugInfo.h"
+#  include "llvm/Support/CFG.h"
 #endif
 
 #include "afl-llvm-common.h"
@@ -115,7 +115,7 @@ uint64_t PowerOf2Ceil(unsigned in) {
 /* #if LLVM_VERSION_STRING >= "4.0.1" */
 #if LLVM_VERSION_MAJOR >= 4 || \
     (LLVM_VERSION_MAJOR == 4 && LLVM_VERSION_PATCH >= 1)
-#define AFL_HAVE_VECTOR_INTRINSICS 1
+#  define AFL_HAVE_VECTOR_INTRINSICS 1
 #endif
 bool AFLCoverage::runOnModule(Module &M) {
 
@@ -242,17 +242,17 @@ bool AFLCoverage::runOnModule(Module &M) {
 
 #ifdef AFL_HAVE_VECTOR_INTRINSICS
   if (ngram_size)
-#ifdef __ANDROID__
+#  ifdef __ANDROID__
     AFLPrevLoc = new GlobalVariable(
         M, PrevLocTy, /* isConstant */ false, GlobalValue::ExternalLinkage,
         /* Initializer */ nullptr, "__afl_prev_loc");
-#else
+#  else
     AFLPrevLoc = new GlobalVariable(
         M, PrevLocTy, /* isConstant */ false, GlobalValue::ExternalLinkage,
         /* Initializer */ nullptr, "__afl_prev_loc",
         /* InsertBefore */ nullptr, GlobalVariable::GeneralDynamicTLSModel,
         /* AddressSpace */ 0, /* IsExternallyInitialized */ false);
-#endif
+#  endif
   else
 #endif
 #ifdef __ANDROID__
diff --git a/llvm_mode/afl-llvm-rt.o.c b/llvm_mode/afl-llvm-rt.o.c
index 56038f7a..6306ae30 100644
--- a/llvm_mode/afl-llvm-rt.o.c
+++ b/llvm_mode/afl-llvm-rt.o.c
@@ -21,7 +21,7 @@
 */
 
 #ifdef __ANDROID__
-#include "android-ashmem.h"
+#  include "android-ashmem.h"
 #endif
 #include "config.h"
 #include "types.h"
@@ -43,7 +43,7 @@
 #include <sys/types.h>
 
 #ifdef __linux__
-#include "snapshot-inl.h"
+#  include "snapshot-inl.h"
 #endif
 
 /* This is a somewhat ugly hack for the experimental 'trace-pc-guard' mode.
@@ -53,7 +53,7 @@
 #define CONST_PRIO 5
 
 #ifndef MAP_FIXED_NOREPLACE
-#define MAP_FIXED_NOREPLACE MAP_FIXED
+#  define MAP_FIXED_NOREPLACE MAP_FIXED
 #endif
 
 #include <sys/mman.h>
@@ -822,15 +822,15 @@ void __cmplog_ins_hook8(uint64_t arg1, uint64_t arg2) {
 }
 
 #if defined(__APPLE__)
-#pragma weak __sanitizer_cov_trace_const_cmp1 = __cmplog_ins_hook1
-#pragma weak __sanitizer_cov_trace_const_cmp2 = __cmplog_ins_hook2
-#pragma weak __sanitizer_cov_trace_const_cmp4 = __cmplog_ins_hook4
-#pragma weak __sanitizer_cov_trace_const_cmp8 = __cmplog_ins_hook8
-
-#pragma weak __sanitizer_cov_trace_cmp1 = __cmplog_ins_hook1
-#pragma weak __sanitizer_cov_trace_cmp2 = __cmplog_ins_hook2
-#pragma weak __sanitizer_cov_trace_cmp4 = __cmplog_ins_hook4
-#pragma weak __sanitizer_cov_trace_cmp8 = __cmplog_ins_hook8
+#  pragma weak __sanitizer_cov_trace_const_cmp1 = __cmplog_ins_hook1
+#  pragma weak __sanitizer_cov_trace_const_cmp2 = __cmplog_ins_hook2
+#  pragma weak __sanitizer_cov_trace_const_cmp4 = __cmplog_ins_hook4
+#  pragma weak __sanitizer_cov_trace_const_cmp8 = __cmplog_ins_hook8
+
+#  pragma weak __sanitizer_cov_trace_cmp1 = __cmplog_ins_hook1
+#  pragma weak __sanitizer_cov_trace_cmp2 = __cmplog_ins_hook2
+#  pragma weak __sanitizer_cov_trace_cmp4 = __cmplog_ins_hook4
+#  pragma weak __sanitizer_cov_trace_cmp8 = __cmplog_ins_hook8
 #else
 void __sanitizer_cov_trace_const_cmp1(uint8_t arg1, uint8_t arg2)
     __attribute__((alias("__cmplog_ins_hook1")));
diff --git a/llvm_mode/cmplog-instructions-pass.cc b/llvm_mode/cmplog-instructions-pass.cc
index 628151c6..61ff58b7 100644
--- a/llvm_mode/cmplog-instructions-pass.cc
+++ b/llvm_mode/cmplog-instructions-pass.cc
@@ -38,12 +38,12 @@
 
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/Verifier.h"
-#include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/Verifier.h"
+#  include "llvm/IR/DebugInfo.h"
 #else
-#include "llvm/Analysis/Verifier.h"
-#include "llvm/DebugInfo.h"
-#define nullptr 0
+#  include "llvm/Analysis/Verifier.h"
+#  include "llvm/DebugInfo.h"
+#  define nullptr 0
 #endif
 
 #include <set>
diff --git a/llvm_mode/cmplog-routines-pass.cc b/llvm_mode/cmplog-routines-pass.cc
index b74fb712..c61374a7 100644
--- a/llvm_mode/cmplog-routines-pass.cc
+++ b/llvm_mode/cmplog-routines-pass.cc
@@ -38,12 +38,12 @@
 
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/Verifier.h"
-#include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/Verifier.h"
+#  include "llvm/IR/DebugInfo.h"
 #else
-#include "llvm/Analysis/Verifier.h"
-#include "llvm/DebugInfo.h"
-#define nullptr 0
+#  include "llvm/Analysis/Verifier.h"
+#  include "llvm/DebugInfo.h"
+#  define nullptr 0
 #endif
 
 #include <set>
diff --git a/llvm_mode/compare-transform-pass.so.cc b/llvm_mode/compare-transform-pass.so.cc
index 00732dbc..5fe0d908 100644
--- a/llvm_mode/compare-transform-pass.so.cc
+++ b/llvm_mode/compare-transform-pass.so.cc
@@ -38,12 +38,12 @@
 
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/Verifier.h"
-#include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/Verifier.h"
+#  include "llvm/IR/DebugInfo.h"
 #else
-#include "llvm/Analysis/Verifier.h"
-#include "llvm/DebugInfo.h"
-#define nullptr 0
+#  include "llvm/Analysis/Verifier.h"
+#  include "llvm/DebugInfo.h"
+#  define nullptr 0
 #endif
 
 #include <set>
diff --git a/llvm_mode/split-compares-pass.so.cc b/llvm_mode/split-compares-pass.so.cc
index 9c91e44f..190b0717 100644
--- a/llvm_mode/split-compares-pass.so.cc
+++ b/llvm_mode/split-compares-pass.so.cc
@@ -37,12 +37,12 @@
 #include "llvm/IR/IRBuilder.h"
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/Verifier.h"
-#include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/Verifier.h"
+#  include "llvm/IR/DebugInfo.h"
 #else
-#include "llvm/Analysis/Verifier.h"
-#include "llvm/DebugInfo.h"
-#define nullptr 0
+#  include "llvm/Analysis/Verifier.h"
+#  include "llvm/DebugInfo.h"
+#  define nullptr 0
 #endif
 
 using namespace llvm;
diff --git a/llvm_mode/split-switches-pass.so.cc b/llvm_mode/split-switches-pass.so.cc
index e8639347..f0b26fce 100644
--- a/llvm_mode/split-switches-pass.so.cc
+++ b/llvm_mode/split-switches-pass.so.cc
@@ -40,12 +40,12 @@
 #include "llvm/IR/IRBuilder.h"
 #if LLVM_VERSION_MAJOR > 3 || \
     (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
-#include "llvm/IR/Verifier.h"
-#include "llvm/IR/DebugInfo.h"
+#  include "llvm/IR/Verifier.h"
+#  include "llvm/IR/DebugInfo.h"
 #else
-#include "llvm/Analysis/Verifier.h"
-#include "llvm/DebugInfo.h"
-#define nullptr 0
+#  include "llvm/Analysis/Verifier.h"
+#  include "llvm/DebugInfo.h"
+#  define nullptr 0
 #endif
 
 #include <set>