projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e2f843
)
add an accessor
author
Chris Lattner
<sabre@nondot.org>
Wed, 14 Sep 2005 18:02:53 +0000
(18:02 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 14 Sep 2005 18:02:53 +0000
(18:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23349
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/CodeGenTarget.h
patch
|
blob
|
history
diff --git
a/utils/TableGen/CodeGenTarget.h
b/utils/TableGen/CodeGenTarget.h
index 1748e8ca8280d8a0ad216f3701041f7232ce376b..aaa6c7a426f5e0ac53b7def161cba1b852f6bdfb 100644
(file)
--- a/
utils/TableGen/CodeGenTarget.h
+++ b/
utils/TableGen/CodeGenTarget.h
@@
-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(); }