split the FFI part of rustc_llvm to rustc_llvm::ffi

This commit is contained in:
Ariel Ben-Yehuda 2016-08-02 23:10:10 +03:00 committed by Ariel Ben-Yehuda
parent d091ef802f
commit 24874170b4
5 changed files with 2090 additions and 2070 deletions

View File

@ -16,7 +16,8 @@ pub use self::Diagnostic::*;
use libc::{c_char, c_uint};
use std::ptr;
use {DebugLocRef, DiagnosticInfoRef, TwineRef, ValueRef};
use {DiagnosticInfoRef, TwineRef, ValueRef};
use ffi::DebugLocRef;
#[derive(Copy, Clone)]
pub enum OptimizationDiagnosticKind {

2063
src/librustc_llvm/ffi.rs Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
#![allow(non_snake_case)]
use llvm;
use llvm::{AtomicBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
use llvm::{AtomicRmwBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
use llvm::{Opcode, IntPredicate, RealPredicate};
use llvm::{ValueRef, BasicBlockRef};
use common::*;
@ -1117,7 +1117,7 @@ pub fn AtomicCmpXchg(cx: Block, dst: ValueRef,
weak: llvm::Bool) -> ValueRef {
B(cx).atomic_cmpxchg(dst, cmp, src, order, failure_order, weak)
}
pub fn AtomicRMW(cx: Block, op: AtomicBinOp,
pub fn AtomicRMW(cx: Block, op: AtomicRmwBinOp,
dst: ValueRef, src: ValueRef,
order: AtomicOrdering) -> ValueRef {
B(cx).atomic_rmw(op, dst, src, order)

View File

@ -11,7 +11,7 @@
#![allow(dead_code)] // FFI wrappers
use llvm;
use llvm::{AtomicBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
use llvm::{AtomicRmwBinOp, AtomicOrdering, SynchronizationScope, AsmDialect};
use llvm::{Opcode, IntPredicate, RealPredicate, False, OperandBundleDef};
use llvm::{ValueRef, BasicBlockRef, BuilderRef, ModuleRef};
use base;
@ -1087,7 +1087,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
order, failure_order, weak)
}
}
pub fn atomic_rmw(&self, op: AtomicBinOp,
pub fn atomic_rmw(&self, op: AtomicRmwBinOp,
dst: ValueRef, src: ValueRef,
order: AtomicOrdering) -> ValueRef {
unsafe {