mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
add an accessor
llvm-svn: 23349
This commit is contained in:
parent
c7fe78d9a1
commit
76f1dae1af
@ -103,6 +103,12 @@ public:
|
||||
return Instructions;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
typedef std::map<std::string,
|
||||
CodeGenInstruction>::const_iterator inst_iterator;
|
||||
inst_iterator inst_begin() const { return getInstructions().begin(); }
|
||||
|
Loading…
Reference in New Issue
Block a user