remove SectionFlags::Small: it is only used on Xcore, and we'll find
[oota-llvm.git] / include / llvm / Support / NoFolder.h
index 40c1996c319bc1422afea22619ba908bdbd28cfa..c110270f3229e845b01954ce2ba50bc0e935a4ee 100644 (file)
@@ -30,7 +30,10 @@ namespace llvm {
 
 /// NoFolder - Create "constants" (actually, values) with no folding.
 class NoFolder {
+  LLVMContext &Context;
 public:
+  
+  NoFolder(LLVMContext &C) : Context(C) { }
 
   //===--------------------------------------------------------------------===//
   // Binary Operators
@@ -113,7 +116,7 @@ public:
 
   Constant *CreateGetElementPtr(Constant *C, Constant* const *IdxList,
                                 unsigned NumIdx) const {
-    return ConstantExpr::getGetElementPtr(C, IdxList, NumIdx);
+    return Context.getConstantExprGetElementPtr(C, IdxList, NumIdx);
   }
   Value *CreateGetElementPtr(Constant *C, Value* const *IdxList,
                              unsigned NumIdx) const {