diff options
Diffstat (limited to 'utils/TableGen/CodeGenTarget.h')
-rw-r--r-- | utils/TableGen/CodeGenTarget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h index d6458f4..5414310 100644 --- a/utils/TableGen/CodeGenTarget.h +++ b/utils/TableGen/CodeGenTarget.h @@ -171,6 +171,9 @@ public: typedef std::vector<const CodeGenInstruction*>::const_iterator inst_iterator; inst_iterator inst_begin() const{return getInstructionsByEnumValue().begin();} inst_iterator inst_end() const { return getInstructionsByEnumValue().end(); } + iterator_range<inst_iterator> instructions() const { + return iterator_range<inst_iterator>(inst_begin(), inst_end()); + } /// isLittleEndianEncoding - are instruction bit patterns defined as [0..n]? |