aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit82d9a642518974b7833407cd80760efad9fa4f2c (patch)
treeced43d7af6fcedbc8c249647a507c89e19928519 /utils/TableGen/CodeGenTarget.cpp
parente186df25cfe1372f3463fdd31e402098514bbabd (diff)
downloadexternal_llvm-82d9a642518974b7833407cd80760efad9fa4f2c.zip
external_llvm-82d9a642518974b7833407cd80760efad9fa4f2c.tar.gz
external_llvm-82d9a642518974b7833407cd80760efad9fa4f2c.tar.bz2
look up instructions by record, not by name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index ec6a31f..499d8ac 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/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 {