mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-16 12:24:44 +00:00
add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6e2f843114
commit
a974b20cae
@ -103,6 +103,12 @@ public:
|
|||||||
return Instructions;
|
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,
|
typedef std::map<std::string,
|
||||||
CodeGenInstruction>::const_iterator inst_iterator;
|
CodeGenInstruction>::const_iterator inst_iterator;
|
||||||
inst_iterator inst_begin() const { return getInstructions().begin(); }
|
inst_iterator inst_begin() const { return getInstructions().begin(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user