1
Fork 0

[LLVM-3.9] Rename custom methods to Rust-specific ones

This commit is contained in:
Jan-Erik Rediger 2016-07-13 00:38:30 +02:00
parent d22a9a2940
commit 7420874a97
3 changed files with 6 additions and 6 deletions

View file

@ -226,7 +226,7 @@ impl Attributes {
pub fn apply_callsite(&self, idx: usize, callsite: ValueRef) { pub fn apply_callsite(&self, idx: usize, callsite: ValueRef) {
unsafe { unsafe {
LLVMAddCallSiteAttribute(callsite, idx as c_uint, self.regular.bits()); LLVMRustAddCallSiteAttribute(callsite, idx as c_uint, self.regular.bits());
if self.dereferenceable_bytes != 0 { if self.dereferenceable_bytes != 0 {
LLVMAddDereferenceableCallSiteAttr(callsite, idx as c_uint, LLVMAddDereferenceableCallSiteAttr(callsite, idx as c_uint,
self.dereferenceable_bytes); self.dereferenceable_bytes);
@ -1056,7 +1056,7 @@ extern {
pub fn LLVMSetInstrParamAlignment(Instr: ValueRef, pub fn LLVMSetInstrParamAlignment(Instr: ValueRef,
index: c_uint, index: c_uint,
align: c_uint); align: c_uint);
pub fn LLVMAddCallSiteAttribute(Instr: ValueRef, pub fn LLVMRustAddCallSiteAttribute(Instr: ValueRef,
index: c_uint, index: c_uint,
Val: uint64_t); Val: uint64_t);
pub fn LLVMAddDereferenceableCallSiteAttr(Instr: ValueRef, pub fn LLVMAddDereferenceableCallSiteAttr(Instr: ValueRef,
@ -1561,7 +1561,7 @@ extern {
Alignment: c_uint) Alignment: c_uint)
-> ValueRef; -> ValueRef;
pub fn LLVMBuildAtomicCmpXchg(B: BuilderRef, pub fn LLVMRustBuildAtomicCmpXchg(B: BuilderRef,
LHS: ValueRef, LHS: ValueRef,
CMP: ValueRef, CMP: ValueRef,
RHS: ValueRef, RHS: ValueRef,

View file

@ -1083,7 +1083,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
failure_order: AtomicOrdering, failure_order: AtomicOrdering,
weak: llvm::Bool) -> ValueRef { weak: llvm::Bool) -> ValueRef {
unsafe { unsafe {
llvm::LLVMBuildAtomicCmpXchg(self.llbuilder, dst, cmp, src, llvm::LLVMRustBuildAtomicCmpXchg(self.llbuilder, dst, cmp, src,
order, failure_order, weak) order, failure_order, weak)
} }
} }

View file

@ -99,7 +99,7 @@ extern "C" LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C) {
return wrap(Type::getMetadataTy(*unwrap(C))); return wrap(Type::getMetadataTy(*unwrap(C)));
} }
extern "C" void LLVMAddCallSiteAttribute(LLVMValueRef Instr, unsigned index, uint64_t Val) { extern "C" void LLVMRustAddCallSiteAttribute(LLVMValueRef Instr, unsigned index, uint64_t Val) {
CallSite Call = CallSite(unwrap<Instruction>(Instr)); CallSite Call = CallSite(unwrap<Instruction>(Instr));
AttrBuilder B; AttrBuilder B;
B.addRawValue(Val); B.addRawValue(Val);
@ -203,7 +203,7 @@ extern "C" LLVMValueRef LLVMBuildAtomicStore(LLVMBuilderRef B,
return wrap(unwrap(B)->Insert(si)); return wrap(unwrap(B)->Insert(si));
} }
extern "C" LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, extern "C" LLVMValueRef LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B,
LLVMValueRef target, LLVMValueRef target,
LLVMValueRef old, LLVMValueRef old,
LLVMValueRef source, LLVMValueRef source,