class ConstantFP;
class MDString;
class MDNode;
-struct LLVMContext;
+class LLVMContext;
class Type;
class Value;
static bool isPod() { return false; }
};
-struct LLVMContextImpl {
+class LLVMContextImpl {
+public:
sys::SmartRWMutex<true> ConstantsLock;
typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*,
StringMap<MDString*> MDStringCache;
- FoldingSet<MDNode> MDNodeSet;
-
ValueMap<char, Type, ConstantAggregateZero> AggZeroConstants;
+
+ typedef ValueMap<std::vector<Value*>, Type, MDNode, true /*largekey*/>
+ MDNodeMapTy;
+
+ MDNodeMapTy MDNodes;
typedef ValueMap<std::vector<Constant*>, ArrayType,
ConstantArray, true /*largekey*/> ArrayConstantsTy;
TypeMap<ArrayValType, ArrayType> ArrayTypes;
TypeMap<VectorValType, VectorType> VectorTypes;
TypeMap<PointerValType, PointerType> PointerTypes;
+ TypeMap<FunctionValType, FunctionType> FunctionTypes;
+ TypeMap<StructValType, StructType> StructTypes;
LLVMContextImpl() : TheTrueVal(0), TheFalseVal(0) { }
};