// method. The specified method must have been compiled before this may be
// used.
//
- virtual void emitAssembly(const Module *M, ostream &OutStr) = 0;
+ virtual void emitAssembly(const Module *M, ostream &OutStr) const = 0;
};
#endif
class SparcAsmPrinter {
ostream &Out;
SlotCalculator Table;
- UltraSparc &Target;
+ const UltraSparc &Target;
enum Sections {
Unknown,
ReadOnly,
} CurSection;
public:
- inline SparcAsmPrinter(ostream &o, const Module *M, UltraSparc &t)
+ inline SparcAsmPrinter(ostream &o, const Module *M, const UltraSparc &t)
: Out(o), Table(SlotCalculator(M, true)), Target(t), CurSection(Unknown) {
emitModule(M);
}
// method. The specified method must have been compiled before this may be
// used.
//
-void UltraSparc::emitAssembly(const Module *M, ostream &Out) {
+void UltraSparc::emitAssembly(const Module *M, ostream &Out) const {
SparcAsmPrinter Print(Out, M, *this);
}
// module. The specified module must have been compiled before this may be
// used.
//
- virtual void emitAssembly(const Module *M, ostream &OutStr);
+ virtual void emitAssembly(const Module *M, ostream &OutStr) const;
};