about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorYoung-il Choi <duddlf.choi@samsung.com>2013-03-20 20:24:39 +0900
committerBrian Anderson <banderson@mozilla.com>2013-04-10 18:49:50 -0700
commit4b4f48283bdd71fa106f1e2ce80c6d2a0d2aff36 (patch)
treef8d9fccd92c445630a6201f7e78ba91897043c49 /src/rustllvm/RustWrapper.cpp
parenta9741bd33d7e55401f506bb82b99411d03ce7e3f (diff)
downloadrust-4b4f48283bdd71fa106f1e2ce80c6d2a0d2aff36.tar.gz
rust-4b4f48283bdd71fa106f1e2ce80c6d2a0d2aff36.zip
rustllvm: followup latest LLVM
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index bdf13746f3e..68483b0280f 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -15,14 +15,12 @@
 //
 //===----------------------------------------------------------------------===
 
-#include "llvm/InlineAsm.h"
-#include "llvm/LLVMContext.h"
 #include "llvm/Linker.h"
 #include "llvm/PassManager.h"
+#include "llvm/IR/InlineAsm.h"
+#include "llvm/IR/LLVMContext.h"
 #include "llvm/Analysis/Verifier.h"
 #include "llvm/Analysis/Passes.h"
-#include "llvm/Transforms/Scalar.h"
-#include "llvm/Transforms/IPO.h"
 #include "llvm/ADT/Triple.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/Assembly/Parser.h"
@@ -31,11 +29,9 @@
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/SourceMgr.h"
-#include "llvm/Target/TargetOptions.h"
 #include "llvm/Support/Host.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/DynamicLibrary.h"
@@ -45,6 +41,10 @@
 #include "llvm/ExecutionEngine/JITMemoryManager.h"
 #include "llvm/ExecutionEngine/MCJIT.h"
 #include "llvm/ExecutionEngine/Interpreter.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetOptions.h"
+#include "llvm/Transforms/Scalar.h"
+#include "llvm/Transforms/IPO.h"
 #include "llvm-c/Core.h"
 #include "llvm-c/BitReader.h"
 #include "llvm-c/Object.h"
@@ -218,6 +218,12 @@ public:
   virtual void deallocateExceptionTable(void *ET) {
     llvm_unreachable("Unimplemented call");
   }
+  virtual uint8_t* allocateDataSection(uintptr_t, unsigned int, unsigned int, bool) {
+    llvm_unreachable("Unimplemented call");
+  }
+  virtual bool applyPermissions(std::string*) {
+    llvm_unreachable("Unimplemented call");
+  }
 };
 
 bool RustMCJITMemoryManager::loadCrate(const char* file, std::string* err) {
@@ -481,7 +487,7 @@ extern "C" LLVMModuleRef LLVMRustParseAssemblyFile(const char *Filename) {
   if (m) {
     return wrap(m);
   } else {
-    LLVMRustError = d.getMessage().c_str();
+    LLVMRustError = d.getMessage().data();
     return NULL;
   }
 }