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.h b/utils/TableGen/CodeGenTarget.h
index 1df74af..d20e868 100644
--- a/utils/TableGen/CodeGenTarget.h
+++ b/utils/TableGen/CodeGenTarget.h
@@ -193,12 +193,15 @@
     if (Instructions.empty()) ReadInstructions();
     return Instructions;
   }
-
+private:
   CodeGenInstruction &getInstruction(const std::string &Name) const {
     const std::map<std::string, CodeGenInstruction> &Insts = getInstructions();
     assert(Insts.count(Name) && "Not an instruction!");
     return const_cast<CodeGenInstruction&>(Insts.find(Name)->second);
   }
+public:
+  
+  CodeGenInstruction &getInstruction(const Record *InstRec) const;  
 
   typedef std::map<std::string,
                    CodeGenInstruction>::const_iterator inst_iterator;