]> git.lizzy.rs Git - rust.git/commitdiff
Fix build issues once LLVM has been upgraded
authorAlex Crichton <alex@alexcrichton.com>
Sat, 25 May 2013 22:23:12 +0000 (17:23 -0500)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 4 Aug 2013 17:58:23 +0000 (10:58 -0700)
* LLVM now has a C interface to LLVMBuildAtomicRMW
* The exception handling support for the JIT seems to have been dropped
* Various interfaces have been added or headers have changed

src/librustc/back/passes.rs
src/librustc/lib/llvm.rs
src/librustc/middle/trans/builder.rs
src/rustllvm/RustWrapper.cpp
src/rustllvm/rustllvm.h

index 714e7d666ac38976025ebff0f36f1013c37f344a..b77ed10c21ba4e3b5abe4cefea307125ac0bc81c 100644 (file)
@@ -97,7 +97,6 @@ pub fn create_standard_passes(level: OptLevel) -> ~[~str] {
         passes.push(~"sroa");
         passes.push(~"domtree");
         passes.push(~"early-cse");
-        passes.push(~"simplify-libcalls");
         passes.push(~"lazy-value-info");
         passes.push(~"jump-threading");
         passes.push(~"correlated-propagation");
index 6c631a104aa9f0fa3c4acb74b575b0b9893dff29..842746f8209ee8d180096fce201b7489beca4548 100644 (file)
@@ -1541,7 +1541,8 @@ pub fn LLVMBuildAtomicRMW(B: BuilderRef,
                                   Op: AtomicBinOp,
                                   LHS: ValueRef,
                                   RHS: ValueRef,
-                                  Order: AtomicOrdering)
+                                  Order: AtomicOrdering,
+                                  SingleThreaded: Bool)
                                   -> ValueRef;
 
         pub fn LLVMBuildAtomicFence(B: BuilderRef, Order: AtomicOrdering);
index d876b4d0b16737c039756f028cc3ec80189d4247..1d821e5af94bd3769c8477a846978c66564209e9 100644 (file)
@@ -940,7 +940,7 @@ pub fn atomic_rmw(&self, op: AtomicBinOp,
                      dst: ValueRef, src: ValueRef,
                      order: AtomicOrdering) -> ValueRef {
         unsafe {
-            llvm::LLVMBuildAtomicRMW(self.llbuilder, op, dst, src, order)
+            llvm::LLVMBuildAtomicRMW(self.llbuilder, op, dst, src, order, False)
         }
     }
 
index beaa7e1daef9c1101ec19c93a56941684607b13d..04c062072d6cb4d8fd9dc4152f0af3f028f95f25 100644 (file)
@@ -113,6 +113,7 @@ public:
 
   virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
                                        unsigned SectionID, bool isReadOnly);
+  bool finalizeMemory(std::string *ErrMsg) { return false; }
 
   virtual bool applyPermissions(std::string *Str);
 
@@ -340,7 +341,6 @@ LLVMRustBuildJIT(void* mem,
 
   std::string Err;
   TargetOptions Options;
-  Options.JITExceptionHandling = true;
   Options.JITEmitDebugInfo = true;
   Options.NoFramePointerElim = true;
   Options.EnableSegmentedStacks = EnableSegmentedStacks;
@@ -516,15 +516,6 @@ extern "C" LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B,
 extern "C" LLVMValueRef LLVMBuildAtomicFence(LLVMBuilderRef B, AtomicOrdering order) {
     return wrap(unwrap(B)->CreateFence(order));
 }
-extern "C" LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,
-                                           AtomicRMWInst::BinOp op,
-                                           LLVMValueRef target,
-                                           LLVMValueRef source,
-                                           AtomicOrdering order) {
-    return wrap(unwrap(B)->CreateAtomicRMW(op,
-                                           unwrap(target), unwrap(source),
-                                           order));
-}
 
 extern "C" void LLVMSetDebug(int Enabled) {
 #ifndef NDEBUG
index d4202abd2854e685a9e6c0774143bbf67b5eb6fd..eeefb19883eb38666957f25fa5f4247439556e3f 100644 (file)
@@ -8,8 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/InlineAsm.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
 #include "llvm/Linker.h"
 #include "llvm/PassManager.h"
 #include "llvm/IR/InlineAsm.h"