Push LLVMContexts through the IntegerType APIs.
[oota-llvm.git] / lib / VMCore / ConstantsContext.h
index 2868f87fa4aaaac2af4969c65c3c836997df5e1a..be75f11e19c1898df0eafd99adb48256afa9d9f3 100644 (file)
@@ -446,7 +446,7 @@ struct ConstantCreator<ConstantAggregateZero, Type, ValType> {
 template<>
 struct ConstantCreator<MDNode, Type, std::vector<Value*> > {
   static MDNode *create(const Type* Ty, const std::vector<Value*> &V) {
-    return new MDNode(&V[0], V.size());
+    return new MDNode(Ty->getContext(), &V[0], V.size());
   }
 };
 
@@ -572,6 +572,7 @@ private:
 public:
   // NOTE: This function is not locked.  It is the caller's responsibility
   // to enforce proper synchronization.
+  typename MapTy::iterator map_begin() { return Map.begin(); }
   typename MapTy::iterator map_end() { return Map.end(); }
     
   /// InsertOrGetItem - Return an iterator for the specified element.