Moved common.rs enums
This commit is contained in:
parent
39fd4d9274
commit
566fa4d003
10 changed files with 173 additions and 155 deletions
|
@ -10,8 +10,9 @@
|
|||
|
||||
use llvm::{AtomicRmwBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
|
||||
use llvm::{self, False, OperandBundleDef, BasicBlock};
|
||||
use common::{self, *};
|
||||
use rustc_codegen_utils::common::IntPredicate;
|
||||
use common;
|
||||
use rustc_codegen_utils::common::{IntPredicate, TypeKind, RealPredicate};
|
||||
use rustc_codegen_utils;
|
||||
use context::CodegenCx;
|
||||
use type_::Type;
|
||||
use type_of::LayoutLlvmExt;
|
||||
|
@ -524,7 +525,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
fn atomic_load(
|
||||
&self,
|
||||
ptr: &'ll Value,
|
||||
order: common::AtomicOrdering,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
size: Size,
|
||||
) -> &'ll Value {
|
||||
self.count_insn("load.atomic");
|
||||
|
@ -678,7 +679,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
}
|
||||
|
||||
fn atomic_store(&self, val: &'ll Value, ptr: &'ll Value,
|
||||
order: common::AtomicOrdering, size: Size) {
|
||||
order: rustc_codegen_utils::common::AtomicOrdering, size: Size) {
|
||||
debug!("Store {:?} -> {:?}", val, ptr);
|
||||
self.count_insn("store.atomic");
|
||||
let ptr = self.check_store(val, ptr);
|
||||
|
@ -1201,8 +1202,8 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
dst: &'ll Value,
|
||||
cmp: &'ll Value,
|
||||
src: &'ll Value,
|
||||
order: common::AtomicOrdering,
|
||||
failure_order: common::AtomicOrdering,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
failure_order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
weak: bool,
|
||||
) -> &'ll Value {
|
||||
let weak = if weak { llvm::True } else { llvm::False };
|
||||
|
@ -1220,10 +1221,10 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
}
|
||||
fn atomic_rmw(
|
||||
&self,
|
||||
op: common::AtomicRmwBinOp,
|
||||
op: rustc_codegen_utils::common::AtomicRmwBinOp,
|
||||
dst: &'ll Value,
|
||||
src: &'ll Value,
|
||||
order: common::AtomicOrdering,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
) -> &'ll Value {
|
||||
unsafe {
|
||||
llvm::LLVMBuildAtomicRMW(
|
||||
|
@ -1236,7 +1237,11 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
fn atomic_fence(&self, order: common::AtomicOrdering, scope: common::SynchronizationScope) {
|
||||
fn atomic_fence(
|
||||
&self,
|
||||
order: rustc_codegen_utils::common::AtomicOrdering,
|
||||
scope: rustc_codegen_utils::common::SynchronizationScope
|
||||
) {
|
||||
unsafe {
|
||||
llvm::LLVMRustBuildAtomicFence(
|
||||
self.llbuilder,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue