1
Fork 0
LLVMRustBuildIntCast -> LLVMBuildIntCast2
LLVMRustAddHandler -> LLVMAddHandler
This commit is contained in:
klensy 2023-04-03 16:30:34 +03:00
parent cc77ae07a9
commit f41e711b7e
3 changed files with 6 additions and 16 deletions

View file

@ -1394,12 +1394,6 @@ extern "C" bool LLVMRustUnpackSMDiagnostic(LLVMSMDiagnosticRef DRef,
return true;
}
extern "C" void LLVMRustAddHandler(LLVMValueRef CatchSwitchRef,
LLVMBasicBlockRef Handler) {
Value *CatchSwitch = unwrap(CatchSwitchRef);
cast<CatchSwitchInst>(CatchSwitch)->addHandler(unwrap(Handler));
}
extern "C" OperandBundleDef *LLVMRustBuildOperandBundleDef(const char *Name,
LLVMValueRef *Inputs,
unsigned NumInputs) {
@ -1564,6 +1558,7 @@ extern "C" void LLVMRustSetLinkage(LLVMValueRef V,
LLVMSetLinkage(V, fromRust(RustLinkage));
}
// FIXME: replace with LLVMConstInBoundsGEP2 when bumped minimal version to llvm-14
extern "C" LLVMValueRef LLVMRustConstInBoundsGEP2(LLVMTypeRef Ty,
LLVMValueRef ConstantVal,
LLVMValueRef *ConstantIndices,
@ -1641,12 +1636,6 @@ extern "C" LLVMRustVisibility LLVMRustGetVisibility(LLVMValueRef V) {
return toRust(LLVMGetVisibility(V));
}
// Oh hey, a binding that makes sense for once? (because LLVMs own do not)
extern "C" LLVMValueRef LLVMRustBuildIntCast(LLVMBuilderRef B, LLVMValueRef Val,
LLVMTypeRef DestTy, bool isSigned) {
return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), isSigned, ""));
}
extern "C" void LLVMRustSetVisibility(LLVMValueRef V,
LLVMRustVisibility RustVisibility) {
LLVMSetVisibility(V, fromRust(RustVisibility));