-
-class DefVal {
- const ConstantInt * const Val;
- const Type * const Ty;
-protected:
- inline DefVal(const ConstantInt *val, const Type *ty) : Val(val), Ty(ty) {}
-public:
- inline const Type *getType() const { return Ty; }
- inline const ConstantInt *getVal() const { return Val; }
- inline operator const ConstantInt * () const { return Val; }
- inline const ConstantInt *operator->() const { return Val; }
-};
-
-struct DefZero : public DefVal {
- inline DefZero(const ConstantInt *val, const Type *ty) : DefVal(val, ty) {}
- inline DefZero(const ConstantInt *val) : DefVal(val, val->getType()) {}
-};
-
-struct DefOne : public DefVal {
- inline DefOne(const ConstantInt *val, const Type *ty) : DefVal(val, ty) {}
-};
+namespace {
+ class DefVal {
+ const ConstantInt * const Val;
+ const Type * const Ty;
+ protected:
+ inline DefVal(const ConstantInt *val, const Type *ty) : Val(val), Ty(ty) {}
+ public:
+ inline const Type *getType() const { return Ty; }
+ inline const ConstantInt *getVal() const { return Val; }
+ inline operator const ConstantInt * () const { return Val; }
+ inline const ConstantInt *operator->() const { return Val; }
+ };
+
+ struct DefZero : public DefVal {
+ inline DefZero(const ConstantInt *val, const Type *ty) : DefVal(val, ty) {}
+ inline DefZero(const ConstantInt *val) : DefVal(val, val->getType()) {}
+ };
+
+ struct DefOne : public DefVal {
+ inline DefOne(const ConstantInt *val, const Type *ty) : DefVal(val, ty) {}
+ };
+}