forked from OSchip/llvm-project
[BOLT] Fix SCTC again again.
Summary: I put the const_cast<BinaryFunction *>(this) on the wrong version of getBasicBlockAfter(). It's on the right one now. (cherry picked from FBD5159127)
This commit is contained in:
parent
6c32079d57
commit
9b190cc74b
|
@ -967,6 +967,12 @@ public:
|
|||
/// nullptr the last basic block is given.
|
||||
const BinaryBasicBlock *getBasicBlockAfter(const BinaryBasicBlock *BB,
|
||||
bool IgnoreSplits = true) const {
|
||||
return
|
||||
const_cast<BinaryFunction *>(this)->getBasicBlockAfter(BB, IgnoreSplits);
|
||||
}
|
||||
|
||||
BinaryBasicBlock *getBasicBlockAfter(const BinaryBasicBlock *BB,
|
||||
bool IgnoreSplits = true) {
|
||||
for (auto I = layout_begin(), E = layout_end(); I != E; ++I) {
|
||||
auto Next = std::next(I);
|
||||
if (*I == BB && Next != E) {
|
||||
|
@ -977,12 +983,6 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
BinaryBasicBlock *getBasicBlockAfter(const BinaryBasicBlock *BB,
|
||||
bool IgnoreSplits = true) {
|
||||
return
|
||||
const_cast<BinaryFunction *>(this)->getBasicBlockAfter(BB, IgnoreSplits);
|
||||
}
|
||||
|
||||
/// Retrieve the landing pad BB associated with invoke instruction \p Invoke
|
||||
/// that is in \p BB. Return nullptr if none exists
|
||||
BinaryBasicBlock *getLandingPadBBFor(const BinaryBasicBlock &BB,
|
||||
|
|
Loading…
Reference in New Issue