Merging r258436:
[oota-llvm.git] / examples / BrainF / BrainF.h
index d0fb1b1de0ef38f1e339bcdc4fc9db9feb5f9835..15e9e0847141fa57b84e31c61eb58bfbfea4122e 100644 (file)
@@ -15,9 +15,9 @@
 #ifndef BRAINF_H
 #define BRAINF_H
 
-#include "llvm/LLVMContext.h"
-#include "llvm/Module.h"
-#include "llvm/Support/IRBuilder.h"
+#include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
 
 using namespace llvm;
 
@@ -39,7 +39,8 @@ class BrainF {
     /// containing the resulting code.
     /// On error, it calls abort.
     /// The caller must delete the returned module.
-    Module *parse(std::istream *in1, int mem, CompileFlags cf, LLVMContext* C);
+    Module *parse(std::istream *in1, int mem, CompileFlags cf,
+                  LLVMContext& C);
 
   protected:
     /// The different symbols in the BrainF language
@@ -65,11 +66,12 @@ class BrainF {
     static const char *testreg;
 
     /// Put the brainf function preamble and other fixed pieces of code
-    void header(LLVMContext* C);
+    void header(LLVMContext& C);
 
     /// The main loop for parsing.  It calls itself recursively
     /// to handle the depth of nesting of "[]".
-    void readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb);
+    void readloop(PHINode *phi, BasicBlock *oldbb,
+                  BasicBlock *testbb, LLVMContext &Context);
 
     /// Constants during parsing
     int memtotal;