Be const correct
authorChris Lattner <sabre@nondot.org>
Mon, 15 Oct 2001 15:54:43 +0000 (15:54 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 15 Oct 2001 15:54:43 +0000 (15:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@826 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetMachine.h
lib/Target/SparcV9/SparcV9AsmPrinter.cpp
lib/Target/SparcV9/SparcV9Internals.h

index 3bca03ec2d7caf91d998c880634f04c20a3c83bb..c66a43f693a8502fa6f640bb8b8537946eb04550 100644 (file)
@@ -82,7 +82,7 @@ public:
   // 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
index 9001c746e74560de6695ac77562633ac62d8d285..7a200e06de7160314a6cb52355a946d2544f9ba7 100644 (file)
@@ -21,7 +21,7 @@ namespace {
 class SparcAsmPrinter {
   ostream &Out;
   SlotCalculator Table;
-  UltraSparc &Target;
+  const UltraSparc &Target;
 
   enum Sections {
     Unknown,
@@ -30,7 +30,7 @@ class SparcAsmPrinter {
     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);
   }
@@ -230,6 +230,6 @@ void SparcAsmPrinter::emitModule(const Module *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);
 }
index 2a1875ee80994675af983aa4ac337fa9ccb971f5..ca02d21fef8f53bf703c63e31fba79fda1af8ef3 100644 (file)
@@ -1082,7 +1082,7 @@ public:
   // 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;
 };