aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/InstPrinter
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-06-02 02:34:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-06-02 02:34:55 +0000
commitcde4ce411b1ace4a80ea1dd38df97e8508aed0c9 (patch)
treea560b88834f814357d15c130319ef3d70502ca94 /lib/Target/PowerPC/InstPrinter
parent491a13691d3b30b8288dfc6e01ad6a58f69a4ce6 (diff)
downloadexternal_llvm-cde4ce411b1ace4a80ea1dd38df97e8508aed0c9.zip
external_llvm-cde4ce411b1ace4a80ea1dd38df97e8508aed0c9.tar.gz
external_llvm-cde4ce411b1ace4a80ea1dd38df97e8508aed0c9.tar.bz2
Don't hardcode the %reg format in the streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/InstPrinter')
-rw-r--r--lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp4
-rw-r--r--lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
index dd9f274..1a9bd76 100644
--- a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
+++ b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
@@ -26,8 +26,8 @@ StringRef PPCInstPrinter::getOpcodeName(unsigned Opcode) const {
return getInstructionName(Opcode);
}
-StringRef PPCInstPrinter::getRegName(unsigned RegNo) const {
- return getRegisterName(RegNo);
+void PPCInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const {
+ OS << getRegisterName(RegNo);
}
void PPCInstPrinter::printInst(const MCInst *MI, raw_ostream &O) {
diff --git a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h
index 6a98411..adfa0aa 100644
--- a/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h
+++ b/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h
@@ -33,7 +33,7 @@ public:
return SyntaxVariant == 1;
}
- StringRef getRegName(unsigned RegNo) const;
+ virtual void printRegName(raw_ostream &OS, unsigned RegNo) const;
virtual void printInst(const MCInst *MI, raw_ostream &O);
virtual StringRef getOpcodeName(unsigned Opcode) const;