We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e9da33 commit 7b9bc47Copy full SHA for 7b9bc47
llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
@@ -186,9 +186,7 @@ void SampleProfileProber::computeCFGHash() {
186
std::vector<uint8_t> Indexes;
187
JamCRC JC;
188
for (auto &BB : *F) {
189
- auto *TI = BB.getTerminator();
190
- for (unsigned I = 0, E = TI->getNumSuccessors(); I != E; ++I) {
191
- auto *Succ = TI->getSuccessor(I);
+ for (BasicBlock *Succ : successors(&BB)) {
192
auto Index = getBlockId(Succ);
193
for (int J = 0; J < 4; J++)
194
Indexes.push_back((uint8_t)(Index >> (J * 8)));
0 commit comments