about summary refs log tree commit diff
path: root/instrumentation/afl-llvm-lto-instrumentation.so.cc
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2021-06-01 18:36:28 +0200
committerhexcoder- <heiko@hexco.de>2021-06-01 18:36:28 +0200
commit97225f1f6f55366a8e2702652dd2e3e1f65b72d5 (patch)
tree2e71d14b2908eccb16cd07e28454b8b31960d54e /instrumentation/afl-llvm-lto-instrumentation.so.cc
parentdb6947452c6d356e30c7fe1bf6697fe59c0e6a38 (diff)
downloadafl++-97225f1f6f55366a8e2702652dd2e3e1f65b72d5.tar.gz
adapt to incompatible LLVM 13 API
Diffstat (limited to 'instrumentation/afl-llvm-lto-instrumentation.so.cc')
-rw-r--r--instrumentation/afl-llvm-lto-instrumentation.so.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/instrumentation/afl-llvm-lto-instrumentation.so.cc b/instrumentation/afl-llvm-lto-instrumentation.so.cc
index fe43fbe5..91f0e7e6 100644
--- a/instrumentation/afl-llvm-lto-instrumentation.so.cc
+++ b/instrumentation/afl-llvm-lto-instrumentation.so.cc
@@ -845,6 +845,9 @@ bool AFLLTOPass::runOnModule(Module &M) {
           if (use_threadsafe_counters) {
 
             IRB.CreateAtomicRMW(llvm::AtomicRMWInst::BinOp::Add, MapPtrIdx, One,
+#if LLVM_VERSION_MAJOR >= 13
+                                llvm_MaybeAlign(1),
+#endif
                                 llvm::AtomicOrdering::Monotonic);
 
           } else {