summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-15 15:54:43 +0000
committerChris Lattner <sabre@nondot.org>2001-10-15 15:54:43 +0000
commit02b671388e4dc6f7ca583388f33d6ee7fdb85974 (patch)
tree5c92a449fc500a3fbc0c1591dfb27c3b72e58ffb /llvm
parent41c4ddad51e67a5af3ff882e61e7439563b9c8b5 (diff)
downloadbcm5719-llvm-02b671388e4dc6f7ca583388f33d6ee7fdb85974.tar.gz
bcm5719-llvm-02b671388e4dc6f7ca583388f33d6ee7fdb85974.zip
Be const correct
llvm-svn: 826
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Target/TargetMachine.h2
-rw-r--r--llvm/lib/Target/Sparc/EmitAssembly.cpp6
-rw-r--r--llvm/lib/Target/Sparc/SparcInternals.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index 3bca03ec2d7..c66a43f693a 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/include/llvm/Target/TargetMachine.h
@@ -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
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index 9001c746e74..7a200e06de7 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -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);
}
diff --git a/llvm/lib/Target/Sparc/SparcInternals.h b/llvm/lib/Target/Sparc/SparcInternals.h
index 2a1875ee809..ca02d21fef8 100644
--- a/llvm/lib/Target/Sparc/SparcInternals.h
+++ b/llvm/lib/Target/Sparc/SparcInternals.h
@@ -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;
};
OpenPOWER on IntegriCloud