]> granicus.if.org Git - llvm/commit
[IR] Redesign the case iterator in SwitchInst to actually be an iterator
authorChandler Carruth <chandlerc@gmail.com>
Wed, 12 Apr 2017 07:27:28 +0000 (07:27 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 12 Apr 2017 07:27:28 +0000 (07:27 +0000)
commitddfada260ad50e3a5ff18f61bed2fd9efadda8d1
tree52aeaaa01f49073f5a21a8084b3ce2bbca04f52c
parent00b79068c49a8dcc50bac690d0a30f04920faa25
[IR] Redesign the case iterator in SwitchInst to actually be an iterator
and to expose a handle to represent the actual case rather than having
the iterator return a reference to itself.

All of this allows the iterator to be used with common STL facilities,
standard algorithms, etc.

Doing this exposed some missing facilities in the iterator facade that
I've fixed and required some work to the actual iterator to fully
support the necessary API.

Differential Revision: https://reviews.llvm.org/D31548

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300032 91177308-0d34-0410-b5e6-96231b3b80d8
28 files changed:
include/llvm/ADT/iterator.h
include/llvm/Analysis/CFGPrinter.h
include/llvm/IR/Instructions.h
lib/Analysis/InlineCost.cpp
lib/Analysis/LazyValueInfo.cpp
lib/Analysis/SparsePropagation.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/CodeGen/CodeGenPrepare.cpp
lib/ExecutionEngine/Interpreter/Execution.cpp
lib/IR/AsmWriter.cpp
lib/IR/Instructions.cpp
lib/Transforms/Coroutines/CoroSplit.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Scalar/JumpThreading.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
lib/Transforms/Scalar/NewGVN.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Utils/CloneFunction.cpp
lib/Transforms/Utils/Evaluator.cpp
lib/Transforms/Utils/Local.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
tools/llvm-diff/DifferenceEngine.cpp
unittests/IR/InstructionsTest.cpp