adapt to incompatible LLVM 13 API

This commit is contained in:
hexcoder- 2021-06-01 18:36:28 +02:00
parent db6947452c
commit 97225f1f6f
4 changed files with 12 additions and 0 deletions

View File

@ -1500,6 +1500,9 @@ void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
if (use_threadsafe_counters) { /* Atomic */
IRB.CreateAtomicRMW(llvm::AtomicRMWInst::BinOp::Add, MapPtrIdx, One,
#if LLVM_VERSION_MAJOR >= 13
llvm_MaybeAlign(1),
#endif
llvm::AtomicOrdering::Monotonic);
} else {

View File

@ -1074,6 +1074,9 @@ void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
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 {

View File

@ -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 {

View File

@ -679,6 +679,9 @@ bool AFLCoverage::runOnModule(Module &M) {
*/
IRB.CreateAtomicRMW(llvm::AtomicRMWInst::BinOp::Add, MapPtrIdx, One,
#if LLVM_VERSION_MAJOR >= 13
llvm_MaybeAlign(1),
#endif
llvm::AtomicOrdering::Monotonic);
/*