From ab50317e96e57dee5b3ff4ad3f16f205b2a3359e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 24 Jan 2024 20:17:23 +0100 Subject: Merge llvm-project main llvmorg-18-init-18359-g93248729cfae This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-18359-g93248729cfae, the last commit before the upstream release/18.x branch was created. PR: 276104 MFC after: 1 month (cherry picked from commit 7a6dacaca14b62ca4b74406814becb87a3fefac0) --- contrib/llvm-project/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'contrib/llvm-project/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp') diff --git a/contrib/llvm-project/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp b/contrib/llvm-project/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp index 8f0b12d0cfed..090e5560483e 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/IPO/SampleProfileProbe.cpp @@ -186,9 +186,7 @@ void SampleProfileProber::computeCFGHash() { std::vector Indexes; JamCRC JC; for (auto &BB : *F) { - auto *TI = BB.getTerminator(); - for (unsigned I = 0, E = TI->getNumSuccessors(); I != E; ++I) { - auto *Succ = TI->getSuccessor(I); + for (BasicBlock *Succ : successors(&BB)) { auto Index = getBlockId(Succ); for (int J = 0; J < 4; J++) Indexes.push_back((uint8_t)(Index >> (J * 8))); -- cgit v1.2.3