const Type *Ty;
public:
- MachineConstantPoolValue(const Type *ty) : Ty(ty) {}
- virtual ~MachineConstantPoolValue() {};
+ explicit MachineConstantPoolValue(const Type *ty) : Ty(ty) {}
+ virtual ~MachineConstantPoolValue() {}
/// getType - get type of this MachineConstantPoolValue.
///
/// print - Implement operator<<...
///
- void print(llvm_ostream &O) const {
- if (O.stream()) print(*O.stream());
- }
virtual void print(std::ostream &O) const = 0;
+ void print(std::ostream *O) const { if (O) print(*O); }
};
-inline llvm_ostream &operator<<(llvm_ostream &OS,
- const MachineConstantPoolValue &V) {
- V.print(OS);
- return OS;
-}
inline std::ostream &operator<<(std::ostream &OS,
const MachineConstantPoolValue &V) {
V.print(OS);
std::vector<MachineConstantPoolEntry> Constants; ///< The pool of constants.
public:
/// @brief The only constructor.
- MachineConstantPool(const TargetData *td) : TD(td), PoolAlignment(1) {}
+ explicit MachineConstantPool(const TargetData *td)
+ : TD(td), PoolAlignment(1) {}
~MachineConstantPool();
/// getConstantPoolAlignment - Return the log2 of the alignment required by
/// print - Used by the MachineFunction printer to print information about
/// constant pool objects. Implemented in MachineFunction.cpp
///
- void print(llvm_ostream &OS) const {
- if (OS.stream()) print(*OS.stream());
- }
void print(std::ostream &OS) const;
+ void print(std::ostream *OS) const { if (OS) print(*OS); }
/// dump - Call print(std::cerr) to be called from the debugger.
///