Be const correct

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@826 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-10-15 15:54:43 +00:00
parent 90c5b3d753
commit ec0a95f4e4
3 changed files with 5 additions and 5 deletions

View File

@ -82,7 +82,7 @@ public:
// method. The specified method must have been compiled before this may be // method. The specified method must have been compiled before this may be
// used. // used.
// //
virtual void emitAssembly(const Module *M, ostream &OutStr) = 0; virtual void emitAssembly(const Module *M, ostream &OutStr) const = 0;
}; };
#endif #endif

View File

@ -21,7 +21,7 @@ namespace {
class SparcAsmPrinter { class SparcAsmPrinter {
ostream &Out; ostream &Out;
SlotCalculator Table; SlotCalculator Table;
UltraSparc &Target; const UltraSparc &Target;
enum Sections { enum Sections {
Unknown, Unknown,
@ -30,7 +30,7 @@ class SparcAsmPrinter {
ReadOnly, ReadOnly,
} CurSection; } CurSection;
public: 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) { : Out(o), Table(SlotCalculator(M, true)), Target(t), CurSection(Unknown) {
emitModule(M); emitModule(M);
} }
@ -230,6 +230,6 @@ void SparcAsmPrinter::emitModule(const Module *M) {
// method. The specified method must have been compiled before this may be // method. The specified method must have been compiled before this may be
// used. // used.
// //
void UltraSparc::emitAssembly(const Module *M, ostream &Out) { void UltraSparc::emitAssembly(const Module *M, ostream &Out) const {
SparcAsmPrinter Print(Out, M, *this); SparcAsmPrinter Print(Out, M, *this);
} }

View File

@ -1082,7 +1082,7 @@ public:
// module. The specified module must have been compiled before this may be // module. The specified module must have been compiled before this may be
// used. // used.
// //
virtual void emitAssembly(const Module *M, ostream &OutStr); virtual void emitAssembly(const Module *M, ostream &OutStr) const;
}; };