summaryrefslogtreecommitdiff
blob: 63c5303d13c70810f064421f4e1be56ec297e33a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff -aur octave-3.8.0/libinterp/corefcn/jit-util.h octave-3.8.0.fix/libinterp/corefcn/jit-util.h
--- octave-3.8.0/libinterp/corefcn/jit-util.h	2013-12-27 15:57:41.000000000 -0600
+++ octave-3.8.0.fix/libinterp/corefcn/jit-util.h	2014-01-16 17:06:47.512782643 -0600
@@ -42,8 +42,10 @@
 {
   class Value;
   class Module;
-  class FunctionPassManager;
-  class PassManager;
+  namespace legacy {
+    class FunctionPassManager;
+    class PassManager;
+  }
   class ExecutionEngine;
   class Function;
   class BasicBlock;
diff -aur octave-3.8.0/libinterp/corefcn/pt-jit.cc octave-3.8.0.fix/libinterp/corefcn/pt-jit.cc
--- octave-3.8.0/libinterp/corefcn/pt-jit.cc	2013-12-27 15:58:17.000000000 -0600
+++ octave-3.8.0.fix/libinterp/corefcn/pt-jit.cc	2014-01-16 17:08:28.030924785 -0600
@@ -52,7 +52,7 @@
 #include <llvm/Bitcode/ReaderWriter.h>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
 #include <llvm/ExecutionEngine/JIT.h>
-#include <llvm/PassManager.h>
+#include <llvm/IR/LegacyPassManager.h>
 
 #ifdef HAVE_LLVM_IR_FUNCTION_H
 #include <llvm/IR/LLVMContext.h>
@@ -1888,10 +1888,10 @@
   if (! engine)
     return false;
 
-  module_pass_manager = new llvm::PassManager ();
+  module_pass_manager = new llvm::legacy::PassManager ();
   module_pass_manager->add (llvm::createAlwaysInlinerPass ());
 
-  pass_manager = new llvm::FunctionPassManager (module);
+  pass_manager = new llvm::legacy::FunctionPassManager (module);
 #ifdef HAVE_LLVM_DATALAYOUT
   pass_manager->add (new llvm::DataLayout (*engine->getDataLayout ()));
 #else
@@ -2007,7 +2007,7 @@
     {
       std::string error;
       llvm::raw_fd_ostream fout ("test.bc", error,
-                                 llvm::raw_fd_ostream::F_Binary);
+                                 llvm::sys::fs::F_Binary);
       llvm::WriteBitcodeToFile (module, fout);
     }
 }
diff -aur octave-3.8.0/libinterp/corefcn/pt-jit.h octave-3.8.0.fix/libinterp/corefcn/pt-jit.h
--- octave-3.8.0/libinterp/corefcn/pt-jit.h	2013-12-27 15:58:17.000000000 -0600
+++ octave-3.8.0.fix/libinterp/corefcn/pt-jit.h	2014-01-16 17:05:08.224619116 -0600
@@ -384,8 +384,8 @@
   size_t trip_count (const octave_value& bounds) const;
 
   llvm::Module *module;
-  llvm::PassManager *module_pass_manager;
-  llvm::FunctionPassManager *pass_manager;
+  llvm::legacy::PassManager *module_pass_manager;
+  llvm::legacy::FunctionPassManager *pass_manager;
   llvm::ExecutionEngine *engine;
 };