about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-20 19:10:11 +0000
committerbors <bors@rust-lang.org>2022-09-20 19:10:11 +0000
commit432abd86f231c908f6df3cdd779e83f35084be90 (patch)
treec29cc2538d936d0746c5b28c474ce005d1f00fb0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentcd8cc91045281f7f1924ecc101f2c6002f6a1eee (diff)
parent25f5483f581a56fa6186ed7e986b0a5d80ba896b (diff)
downloadrust-432abd86f231c908f6df3cdd779e83f35084be90.tar.gz
rust-432abd86f231c908f6df3cdd779e83f35084be90.zip
Auto merge of #102061 - notriddle:rollup-kwu9vp8, r=notriddle
Rollup of 12 pull requests

Successful merges:

 - #100250 (Manually cleanup token stream when macro expansion aborts.)
 - #101014 (Fix -Zmeta-stats ICE by giving `FileEncoder` file read permissions)
 - #101958 (Improve error for when query is unsupported by crate)
 - #101976 (MirPhase: clarify that linting is not a semantic change)
 - #102001 (Use LLVM C-API to build atomic cmpxchg and fence)
 - #102008 (Add GUI test for notable traits element position)
 - #102013 (Simplify rpitit handling on lower_fn_decl)
 - #102021 (some post-valtree cleanup)
 - #102027 (rustdoc: remove `docblock` class from `item-decl`)
 - #102034 (rustdoc: remove no-op CSS `h1-6 { border-bottom-color }`)
 - #102038 (Make the `normalize-overflow` rustdoc test actually do something)
 - #102053 (:arrow_up: rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 6ee3c7d6821..b2cfcf53c59 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -406,45 +406,6 @@ extern "C" LLVMValueRef LLVMRustBuildAtomicStore(LLVMBuilderRef B,
   return wrap(SI);
 }
 
-// FIXME: Use the C-API LLVMBuildAtomicCmpXchg and LLVMSetWeak
-// once we raise our minimum support to LLVM 10.
-extern "C" LLVMValueRef
-LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Target,
-                           LLVMValueRef Old, LLVMValueRef Source,
-                           LLVMAtomicOrdering Order,
-                           LLVMAtomicOrdering FailureOrder, LLVMBool Weak) {
-  // 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));
-  ACXI->setWeak(Weak);
-  return wrap(ACXI);
-}
-
-enum class LLVMRustSynchronizationScope {
-  SingleThread,
-  CrossThread,
-};
-
-static SyncScope::ID fromRust(LLVMRustSynchronizationScope Scope) {
-  switch (Scope) {
-  case LLVMRustSynchronizationScope::SingleThread:
-    return SyncScope::SingleThread;
-  case LLVMRustSynchronizationScope::CrossThread:
-    return SyncScope::System;
-  default:
-    report_fatal_error("bad SynchronizationScope.");
-  }
-}
-
-extern "C" LLVMValueRef
-LLVMRustBuildAtomicFence(LLVMBuilderRef B, LLVMAtomicOrdering Order,
-                         LLVMRustSynchronizationScope Scope) {
-  return wrap(unwrap(B)->CreateFence(fromRust(Order), fromRust(Scope)));
-}
-
 enum class LLVMRustAsmDialect {
   Att,
   Intel,