-/// LayoutInfo - The lazy cache of structure layout information maintained by
-/// TargetData. Note that the struct types must have been free'd before
-/// llvm_shutdown is called (and thus this is deallocated) because all the
-/// targets with cached elements should have been destroyed.
-///
-typedef std::pair<const TargetData*,const StructType*> LayoutKey;
-
-struct DenseMapLayoutKeyInfo {
- static inline LayoutKey getEmptyKey() { return LayoutKey(0, 0); }
- static inline LayoutKey getTombstoneKey() {
- return LayoutKey((TargetData*)(intptr_t)-1, 0);
- }
- static unsigned getHashValue(const LayoutKey &Val) {
- return DenseMapKeyInfo<void*>::getHashValue(Val.first) ^
- DenseMapKeyInfo<void*>::getHashValue(Val.second);
- }
- static bool isPod() { return true; }
-};
-
-typedef DenseMap<LayoutKey, StructLayout*, DenseMapLayoutKeyInfo> LayoutInfoTy;
-static ManagedStatic<LayoutInfoTy> LayoutInfo;
-