Remove dead code from rustc_codegen_llvm and the LLVM wrapper
This commit is contained in:
parent
79f82ad5e8
commit
2a6b27444a
2 changed files with 0 additions and 60 deletions
|
@ -195,33 +195,6 @@ LLVMRustVerifyFunction(LLVMValueRef Fn, LLVMRustVerifierFailureAction Action) {
|
|||
return LLVMVerifyFunction(Fn, fromRust(Action));
|
||||
}
|
||||
|
||||
enum class LLVMRustTailCallKind {
|
||||
None,
|
||||
Tail,
|
||||
MustTail,
|
||||
NoTail,
|
||||
};
|
||||
|
||||
static CallInst::TailCallKind fromRust(LLVMRustTailCallKind Kind) {
|
||||
switch (Kind) {
|
||||
case LLVMRustTailCallKind::None:
|
||||
return CallInst::TailCallKind::TCK_None;
|
||||
case LLVMRustTailCallKind::Tail:
|
||||
return CallInst::TailCallKind::TCK_Tail;
|
||||
case LLVMRustTailCallKind::MustTail:
|
||||
return CallInst::TailCallKind::TCK_MustTail;
|
||||
case LLVMRustTailCallKind::NoTail:
|
||||
return CallInst::TailCallKind::TCK_NoTail;
|
||||
default:
|
||||
report_fatal_error("bad CallInst::TailCallKind.");
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustSetTailCallKind(LLVMValueRef Call,
|
||||
LLVMRustTailCallKind TCK) {
|
||||
unwrap<CallInst>(Call)->setTailCallKind(fromRust(TCK));
|
||||
}
|
||||
|
||||
extern "C" LLVMValueRef LLVMRustGetOrInsertFunction(LLVMModuleRef M,
|
||||
const char *Name,
|
||||
size_t NameLen,
|
||||
|
@ -1976,10 +1949,6 @@ extern "C" int32_t LLVMRustGetElementTypeArgIndex(LLVMValueRef CallSite) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
extern "C" bool LLVMRustIsBitcode(char *ptr, size_t len) {
|
||||
return identify_magic(StringRef(ptr, len)) == file_magic::bitcode;
|
||||
}
|
||||
|
||||
extern "C" bool LLVMRustIsNonGVFunctionPointerTy(LLVMValueRef V) {
|
||||
if (unwrap<Value>(V)->getType()->isPointerTy()) {
|
||||
if (auto *GV = dyn_cast<GlobalValue>(unwrap<Value>(V))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue