Update for llvm api change.
This commit is contained in:
parent
c96f62a29d
commit
4cee063976
|
@ -571,7 +571,6 @@ native "cdecl" mod llvm = "rustllvm" {
|
|||
fn LLVMBuildInvoke(B: BuilderRef, Fn: ValueRef, Args: *ValueRef,
|
||||
NumArgs: uint, Then: BasicBlockRef,
|
||||
Catch: BasicBlockRef, Name: sbuf) -> ValueRef;
|
||||
fn LLVMBuildUnwind(B: BuilderRef) -> ValueRef;
|
||||
fn LLVMBuildUnreachable(B: BuilderRef) -> ValueRef;
|
||||
|
||||
/* Add a case to the switch instruction */
|
||||
|
@ -949,12 +948,6 @@ obj builder(B: BuilderRef, terminated: @mutable bool,
|
|||
Then, Catch, str::buf(""));
|
||||
}
|
||||
|
||||
fn Unwind() -> ValueRef {
|
||||
assert (!*terminated);
|
||||
*terminated = true;
|
||||
ret llvm::LLVMBuildUnwind(B);
|
||||
}
|
||||
|
||||
fn Unreachable() -> ValueRef {
|
||||
assert (!*terminated);
|
||||
*terminated = true;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Support/PassManagerBuilder.h"
|
||||
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm-c/Core.h"
|
||||
#include <cstdlib>
|
||||
|
|
|
@ -79,15 +79,16 @@ extern "C" void LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
|
|||
llvm::NoFramePointerElim = true;
|
||||
|
||||
InitializeAllTargets();
|
||||
InitializeAllTargetMCs();
|
||||
InitializeAllAsmPrinters();
|
||||
InitializeAllAsmParsers();
|
||||
TargetMachine::setRelocationModel(Reloc::PIC_);
|
||||
std::string Err;
|
||||
const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
|
||||
std::string FeaturesStr;
|
||||
std::string Trip(triple);
|
||||
std::string CPUStr = llvm::sys::getHostCPUName();
|
||||
TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr);
|
||||
TargetMachine *Target =
|
||||
TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr, Reloc::PIC_);
|
||||
bool NoVerify = false;
|
||||
PassManager *PM = unwrap<PassManager>(PMR);
|
||||
std::string ErrorInfo;
|
||||
|
|
|
@ -165,7 +165,6 @@ LLVMBuildUDiv
|
|||
LLVMBuildUIToFP
|
||||
LLVMBuildURem
|
||||
LLVMBuildUnreachable
|
||||
LLVMBuildUnwind
|
||||
LLVMBuildVAArg
|
||||
LLVMBuildXor
|
||||
LLVMBuildZExt
|
||||
|
@ -429,7 +428,6 @@ LLVMInt8TypeInContext
|
|||
LLVMIntPtrType
|
||||
LLVMIntType
|
||||
LLVMIntTypeInContext
|
||||
LLVMInvalidateStructLayout
|
||||
LLVMIsAAllocaInst
|
||||
LLVMIsAArgument
|
||||
LLVMIsABasicBlock
|
||||
|
|
Loading…
Reference in New Issue