Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK...
[oota-llvm.git] / include / llvm / Analysis / ScalarEvolutionExpander.h
index e3ff5b4690cc66f25dbc26f3f4c204f1d92b2ca2..9266bf9713c8dcc853ff010b6b107a4f4c3e19cb 100644 (file)
@@ -17,6 +17,7 @@
 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
 #include "llvm/Support/IRBuilder.h"
 #include "llvm/Support/TargetFolder.h"
+#include <set>
 
 namespace llvm {
   /// SCEVExpander - This class uses information about analyze scalars to
@@ -37,8 +38,8 @@ namespace llvm {
     friend struct SCEVVisitor<SCEVExpander, Value*>;
   public:
     explicit SCEVExpander(ScalarEvolution &se)
-      : SE(se), Builder(*se.getContext(),
-                        TargetFolder(se.TD, *se.getContext())) {}
+      : SE(se), Builder(se.getContext(),
+                        TargetFolder(se.TD, se.getContext())) {}
 
     /// clear - Erase the contents of the InsertedExpressions map so that users
     /// trying to expand the same expression into multiple BasicBlocks or
@@ -60,7 +61,7 @@ namespace llvm {
     }
 
   private:
-    LLVMContext *getContext() const { return SE.getContext(); }
+    LLVMContext &getContext() const { return SE.getContext(); }
     
     /// InsertBinop - Insert the specified binary operator, doing a small amount
     /// of work to avoid inserting an obviously redundant operation.