aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Target/TargetMachine.h2
-rw-r--r--lib/Target/SparcV9/SparcV9AsmPrinter.cpp6
-rw-r--r--lib/Target/SparcV9/SparcV9Internals.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index 3bca03ec2d..c66a43f693 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/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/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
index 9001c746e7..7a200e06de 100644
--- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
+++ b/lib/Target/SparcV9/SparcV9AsmPrinter.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/lib/Target/SparcV9/SparcV9Internals.h b/lib/Target/SparcV9/SparcV9Internals.h
index 2a1875ee80..ca02d21fef 100644
--- a/lib/Target/SparcV9/SparcV9Internals.h
+++ b/lib/Target/SparcV9/SparcV9Internals.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;
};