mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
llvm-wrapper: add alignment argument to CreateAtomicCmpXchg
As far as I can tell what we've been getting is llvm::MaybeAlign(), so just use that for now. This is required sometime after 24539f1ef2471d07bd87f833cb0288fc0f251f4b.
This commit is contained in:
parent
af95484778
commit
0ed1c33ad9
@ -382,9 +382,15 @@ LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Target,
|
||||
LLVMValueRef Old, LLVMValueRef Source,
|
||||
LLVMAtomicOrdering Order,
|
||||
LLVMAtomicOrdering FailureOrder, LLVMBool Weak) {
|
||||
#if LLVM_VERSION_GE(12,0)
|
||||
AtomicCmpXchgInst *ACXI = unwrap(B)->CreateAtomicCmpXchg(
|
||||
unwrap(Target), unwrap(Old), unwrap(Source), llvm::MaybeAlign(), fromRust(Order),
|
||||
fromRust(FailureOrder));
|
||||
#else
|
||||
AtomicCmpXchgInst *ACXI = unwrap(B)->CreateAtomicCmpXchg(
|
||||
unwrap(Target), unwrap(Old), unwrap(Source), fromRust(Order),
|
||||
fromRust(FailureOrder));
|
||||
#endif
|
||||
ACXI->setWeak(Weak);
|
||||
return wrap(ACXI);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user