Skip to content

Commit b33fa70

Browse files
cixtorgraydon
authored andcommitted
---
yaml --- r: 4567 b: refs/heads/master c: 4cee063 h: refs/heads/master i: 4565: 327774e 4563: 5f183c6 4559: e1aed3c v: v3
1 parent 00745da commit b33fa70

File tree

5 files changed

+6
-13
lines changed

5 files changed

+6
-13
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c96f62a29d6a2e61c886e7c8509aeb9a44f53164
2+
refs/heads/master: 4cee06397633cede0163d4b520a979cb7a5177de

trunk/src/comp/lib/llvm.rs

-7
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,6 @@ native "cdecl" mod llvm = "rustllvm" {
571571
fn LLVMBuildInvoke(B: BuilderRef, Fn: ValueRef, Args: *ValueRef,
572572
NumArgs: uint, Then: BasicBlockRef,
573573
Catch: BasicBlockRef, Name: sbuf) -> ValueRef;
574-
fn LLVMBuildUnwind(B: BuilderRef) -> ValueRef;
575574
fn LLVMBuildUnreachable(B: BuilderRef) -> ValueRef;
576575

577576
/* Add a case to the switch instruction */
@@ -949,12 +948,6 @@ obj builder(B: BuilderRef, terminated: @mutable bool,
949948
Then, Catch, str::buf(""));
950949
}
951950

952-
fn Unwind() -> ValueRef {
953-
assert (!*terminated);
954-
*terminated = true;
955-
ret llvm::LLVMBuildUnwind(B);
956-
}
957-
958951
fn Unreachable() -> ValueRef {
959952
assert (!*terminated);
960953
*terminated = true;

trunk/src/rustllvm/Passes.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "llvm/Analysis/Passes.h"
2-
#include "llvm/Support/PassManagerBuilder.h"
2+
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
3+
#include "llvm/Transforms/IPO.h"
34
#include "llvm/PassManager.h"
45
#include "llvm-c/Core.h"
56
#include <cstdlib>

trunk/src/rustllvm/RustWrapper.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,16 @@ extern "C" void LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
7979
llvm::NoFramePointerElim = true;
8080

8181
InitializeAllTargets();
82+
InitializeAllTargetMCs();
8283
InitializeAllAsmPrinters();
8384
InitializeAllAsmParsers();
84-
TargetMachine::setRelocationModel(Reloc::PIC_);
8585
std::string Err;
8686
const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err);
8787
std::string FeaturesStr;
8888
std::string Trip(triple);
8989
std::string CPUStr = llvm::sys::getHostCPUName();
90-
TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr);
90+
TargetMachine *Target =
91+
TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr, Reloc::PIC_);
9192
bool NoVerify = false;
9293
PassManager *PM = unwrap<PassManager>(PMR);
9394
std::string ErrorInfo;

trunk/src/rustllvm/rustllvm.def.in

-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ LLVMBuildUDiv
165165
LLVMBuildUIToFP
166166
LLVMBuildURem
167167
LLVMBuildUnreachable
168-
LLVMBuildUnwind
169168
LLVMBuildVAArg
170169
LLVMBuildXor
171170
LLVMBuildZExt
@@ -429,7 +428,6 @@ LLVMInt8TypeInContext
429428
LLVMIntPtrType
430429
LLVMIntType
431430
LLVMIntTypeInContext
432-
LLVMInvalidateStructLayout
433431
LLVMIsAAllocaInst
434432
LLVMIsAArgument
435433
LLVMIsABasicBlock

0 commit comments

Comments
 (0)