Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen
[oota-llvm.git] / lib / Transforms / TransformInternals.h
index 4f92dc4eda8db3a7c6e1bdb3d80fbaf237a810f5..b5747c91303fd7b1c95bb2be42258879f59ac0de 100644 (file)
@@ -22,6 +22,8 @@
 #include <map>
 #include <set>
 
+namespace llvm {
+
 static inline int64_t getConstantValue(const ConstantInt *CPI) {
   return (int64_t)cast<ConstantInt>(CPI)->getRawValue();
 }
@@ -88,7 +90,8 @@ public:
 
 typedef std::map<const Value*, const Type*> ValueTypeCache;
 
-struct ValueMapCache {
+class ValueMapCache {
+public:
   // Operands mapped - Contains an entry if the first value (the user) has had
   // the second value (the operand) mapped already.
   //
@@ -139,4 +142,6 @@ const Type *getStructOffsetType(const Type *Ty, unsigned &Offset,
                                 std::vector<Value*> &Offsets,
                                 const TargetData &TD, bool StopEarly = true);
 
+} // End llvm namespace
+
 #endif