IR: Fix a missed case when threading OnlyIfReduced through ConstantExpr
[oota-llvm.git] / include / llvm / IR / GVMaterializer.h
index 229048a3ba2e4fb9bc9dd9ce2dcfa6cd1dfab5f6..a1216a174282b4b0b7883d116ac67d50ff2a4da8 100644 (file)
@@ -21,7 +21,6 @@
 #include <system_error>
 
 namespace llvm {
-using std::error_code;
 class Function;
 class GlobalValue;
 class Module;
@@ -43,7 +42,7 @@ public:
 
   /// Make sure the given GlobalValue is fully read.
   ///
-  virtual error_code Materialize(GlobalValue *GV) = 0;
+  virtual std::error_code Materialize(GlobalValue *GV) = 0;
 
   /// If the given GlobalValue is read in, and if the GVMaterializer supports
   /// it, release the memory for the GV, and set it up to be materialized
@@ -54,7 +53,9 @@ public:
 
   /// Make sure the entire Module has been completely read.
   ///
-  virtual error_code MaterializeModule(Module *M) = 0;
+  virtual std::error_code MaterializeModule(Module *M) = 0;
+
+  virtual void releaseBuffer() = 0;
 };
 
 } // End llvm namespace