diff gen/irstate.h @ 1535:61f12f4651b5

Don't use llvm::getGlobalContext() anymore
author Benjamin Kramer <benny.kra@gmail.com>
date Mon, 13 Jul 2009 20:16:15 +0200
parents ad7f2f1862d6
children 8d086d552909
line wrap: on
line diff
--- a/gen/irstate.h	Mon Jul 13 12:17:58 2009 +0200
+++ b/gen/irstate.h	Mon Jul 13 20:16:15 2009 +0200
@@ -16,6 +16,7 @@
 #include "llvm/Support/CallSite.h"
 
 namespace llvm {
+    class LLVMContext;
     class TargetMachine;
 }
 
@@ -108,6 +109,9 @@
     const LLStructType* mutexType;
     const LLStructType* moduleRefType;
 
+    // helper to get the LLVMContext of the module
+    llvm::LLVMContext& context() const { return module->getContext(); }
+
     // functions
     typedef std::vector<IrFunction*> FunctionVector;
     FunctionVector functions;