aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-08-05 17:43:01 +0000
committerPete Cooper <peter_cooper@apple.com>2015-08-05 17:43:01 +0000
commit3ae0ee545351047f2f31bd34515dfce4978b4d11 (patch)
treef62c2a596e665f7d182ab90d5591070d95b72e77 /clang/lib/CodeGen/CodeGenModule.cpp
parentdfcecdeeb2e53be1ad4b60d747efe3c1b8376d6e (diff)
downloadllvm-3ae0ee545351047f2f31bd34515dfce4978b4d11.zip
llvm-3ae0ee545351047f2f31bd34515dfce4978b4d11.tar.gz
llvm-3ae0ee545351047f2f31bd34515dfce4978b4d11.tar.bz2
Move BB succ_iterator to be inside TerminatorInst. NFC.
To get the successors of a BB we currently do successors(BB) which ultimately walks the successors of the BB's terminator. This moves the iterator to TerminatorInst as thats what we're actually using to do the iteration, and adds a member function to TerminatorInst to allow us to iterate directly over successors given an instruction. For example, we can now do for (auto *Succ : BI->successors()) instead of for (unsigned i = 0, e = BI->getNumSuccessors(); i != e; ++i) Reviewed by Tobias Grosser. llvm-svn: 244074
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions