From 75c86c9e9ad1b5e4f31fd78b819ef9e45caa5b6b Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Mon, 3 Mar 2014 13:00:39 +0000 Subject: [C++11] Add a basic block range view for RegionInfo This also switches the users in LLVM to ensure this functionality is tested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202705 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/RegionInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Analysis/RegionInfo.cpp') diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index 876d86b785..f4da598d84 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -438,8 +438,8 @@ void Region::print(raw_ostream &OS, bool print_tree, unsigned level, OS.indent(level*2 + 2); if (Style == PrintBB) { - for (const_block_iterator I = block_begin(), E = block_end(); I != E; ++I) - OS << (*I)->getName() << ", "; // TODO: remove the last "," + for (const auto &BB : blocks()) + OS << BB->getName() << ", "; // TODO: remove the last "," } else if (Style == PrintRN) { for (const_element_iterator I = element_begin(), E = element_end(); I!=E; ++I) OS << **I << ", "; // TODO: remove the last ", -- cgit v1.2.3