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
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 @@
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 {