aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-17 22:54:55 +0000
committerChris Lattner <sabre@nondot.org>2002-11-17 22:54:55 +0000
commit9bca50d6ddb8b53659a8db1dfa91a8b239178fe9 (patch)
treed8ab1d15bcce76123b91429570e433c86997da7d
parentdbb61c6445513f5cfd057c74da9e5c8299353c68 (diff)
Add machine independant printer interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4729 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/MachineInstrInfo.h6
-rw-r--r--include/llvm/Target/TargetInstrInfo.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Target/MachineInstrInfo.h b/include/llvm/Target/MachineInstrInfo.h
index 2b2cec31cc..5c694f6679 100644
--- a/include/llvm/Target/MachineInstrInfo.h
+++ b/include/llvm/Target/MachineInstrInfo.h
@@ -94,6 +94,12 @@ public:
return desc[opCode];
}
+ /// print - Print out the specified machine instruction in the appropriate
+ /// target specific assembly language. If this method is not overridden, the
+ /// default implementation uses the crummy machine independant printer.
+ ///
+ virtual void print(const MachineInstr *MI, std::ostream &O) const;
+
const char *getName(MachineOpCode opCode) const {
return get(opCode).Name;
}
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 2b2cec31cc..5c694f6679 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -94,6 +94,12 @@ public:
return desc[opCode];
}
+ /// print - Print out the specified machine instruction in the appropriate
+ /// target specific assembly language. If this method is not overridden, the
+ /// default implementation uses the crummy machine independant printer.
+ ///
+ virtual void print(const MachineInstr *MI, std::ostream &O) const;
+
const char *getName(MachineOpCode opCode) const {
return get(opCode).Name;
}