From 88bb87cbe045359451d501c1996e60e295188192 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Sat, 24 Dec 2016 21:52:10 +0000 Subject: [PATCH] Add range iterator for blocks in MemoryPhi llvm-svn: 290504 --- include/llvm/Transforms/Utils/MemorySSA.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/llvm/Transforms/Utils/MemorySSA.h b/include/llvm/Transforms/Utils/MemorySSA.h index fc392441494..84892e5d3ad 100644 --- a/include/llvm/Transforms/Utils/MemorySSA.h +++ b/include/llvm/Transforms/Utils/MemorySSA.h @@ -387,6 +387,14 @@ public: return block_begin() + getNumOperands(); } + iterator_range blocks() { + return make_range(block_begin(), block_end()); + } + + iterator_range blocks() const { + return make_range(block_begin(), block_end()); + } + op_range incoming_values() { return operands(); } const_op_range incoming_values() const { return operands(); }