summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2014-04-18 02:09:02 +0000
committerJim Grosbach <grosbach@apple.com>2014-04-18 02:09:02 +0000
commit56fd888e10794e59e13f32d551c935e06bc86852 (patch)
tree90a88301e5d0e76f91c522bcc9400bb400986d7a /llvm/utils/TableGen
parent0e28a3554b10f58f8a5c787720b62829b5553af8 (diff)
downloadbcm5719-llvm-56fd888e10794e59e13f32d551c935e06bc86852.tar.gz
bcm5719-llvm-56fd888e10794e59e13f32d551c935e06bc86852.zip
iterator_range accessor for CodeGenTarget instruction list.
llvm-svn: 206551
Diffstat (limited to 'llvm/utils/TableGen')
-rw-r--r--llvm/utils/TableGen/CodeGenInstruction.h1
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.h b/llvm/utils/TableGen/CodeGenInstruction.h
index 75afab5c693..dc39eb973b9 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.h
+++ b/llvm/utils/TableGen/CodeGenInstruction.h
@@ -156,7 +156,6 @@ namespace llvm {
iterator end() { return OperandList.end(); }
const_iterator end() const { return OperandList.end(); }
-
/// getOperandNamed - Return the index of the operand with the specified
/// non-empty name. If the instruction does not have an operand with the
/// specified name, abort.
diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h
index d6458f41cf2..54143103dc1 100644
--- a/llvm/utils/TableGen/CodeGenTarget.h
+++ b/llvm/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]?
OpenPOWER on IntegriCloud