Factor some of the constants+context related code out into a separate header, to...
[oota-llvm.git] / include / llvm / LLVMContext.h
index ab2df1b70ae46e2406f007d08d0a0f0398cada44..0aea6b89222a4a51267494e7020ead4d1652bfee 100644 (file)
@@ -34,7 +34,7 @@ class ConstantStruct;
 class ConstantVector;
 class FunctionType;
 class IntegerType;
-class LLVMContextImpl;
+struct LLVMContextImpl;
 class MDNode;
 class MDString;
 class OpaqueType;
@@ -52,41 +52,11 @@ class VectorType;
 /// infrastructure, including the type and constant uniquing tables.
 /// LLVMContext itself provides no locking guarantees, so you should be careful
 /// to have one context per thread.
-class LLVMContext {
+struct LLVMContext {
   LLVMContextImpl* pImpl;
   
-  friend class ConstantInt;
-  friend class ConstantFP;
-  friend class ConstantStruct;
-  friend class ConstantArray;
-  friend class ConstantVector;
-  friend class ConstantAggregateZero;
-public:
   LLVMContext();
   ~LLVMContext();
-  
-  // Constant accessors
-  Constant* getNullValue(const Type* Ty);
-  
-  /// @returns the value for an integer constant of the given type that has all
-  /// its bits set to true.
-  /// @brief Get the all ones value
-  Constant* getAllOnesValue(const Type* Ty);
-  
-  // ConstantInt accessors
-  ConstantInt* getTrue();
-  ConstantInt* getFalse();
-        
-  // MDNode accessors
-  MDNode* getMDNode(Value* const* Vals, unsigned NumVals);
-  
-  // MDString accessors
-  MDString* getMDString(const StringRef &Str);
-  
-  
-  // Methods for erasing constants
-  void erase(MDString *M);
-  void erase(MDNode *M);
 };
 
 /// FOR BACKWARDS COMPATIBILITY - Returns a global context.