summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-19 00:07:20 +0000
committerChris Lattner <sabre@nondot.org>2010-03-19 00:07:20 +0000
commit9aec14b5607e8184b19f2d33d307b328f2a700c0 (patch)
tree03deb3942bdd4ee6e54774f1ad9c144423b1fcf4 /llvm/utils/TableGen/CodeGenTarget.cpp
parent83facb08120b04b9c5f8b323675d01cacfa1f3af (diff)
downloadbcm5719-llvm-9aec14b5607e8184b19f2d33d307b328f2a700c0.tar.gz
bcm5719-llvm-9aec14b5607e8184b19f2d33d307b328f2a700c0.zip
look up instructions by record, not by name.
llvm-svn: 98904
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index ec6a31fd195..499d8aca9e1 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/CodeGenTarget.cpp
@@ -138,6 +138,12 @@ Record *CodeGenTarget::getInstructionSet() const {
return TargetRec->getValueAsDef("InstructionSet");
}
+
+CodeGenInstruction &CodeGenTarget::getInstruction(const Record *InstRec) const {
+ return getInstruction(InstRec->getName());
+}
+
+
/// getAsmParser - Return the AssemblyParser definition for this target.
///
Record *CodeGenTarget::getAsmParser() const {
OpenPOWER on IntegriCloud