cleanup: add some comments per review feedback
This commit is contained in:
parent
babe894bab
commit
9431e8577d
2 changed files with 6 additions and 0 deletions
|
@ -1438,6 +1438,9 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
|
|||
};
|
||||
|
||||
#if LLVM_VERSION_GE(13,0)
|
||||
// Uses FromPrevailing visibility scheme which works for many binary
|
||||
// formats. We probably could and should use ELF visibility scheme for many of
|
||||
// our targets, however.
|
||||
lto::Config conf;
|
||||
thinLTOResolvePrevailingInIndex(conf, Ret->Index, isPrevailing, recordNewLinkage,
|
||||
Ret->GUIDPreservedSymbols);
|
||||
|
|
|
@ -383,6 +383,9 @@ LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Target,
|
|||
LLVMAtomicOrdering Order,
|
||||
LLVMAtomicOrdering FailureOrder, LLVMBool Weak) {
|
||||
#if LLVM_VERSION_GE(13,0)
|
||||
// Rust probably knows the alignment of the target value and should be able to
|
||||
// specify something more precise than MaybeAlign here. See also
|
||||
// https://reviews.llvm.org/D97224 which may be a useful reference.
|
||||
AtomicCmpXchgInst *ACXI = unwrap(B)->CreateAtomicCmpXchg(
|
||||
unwrap(Target), unwrap(Old), unwrap(Source), llvm::MaybeAlign(), fromRust(Order),
|
||||
fromRust(FailureOrder));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue