[BOLT] Use llvm::upper_bound (NFC) (#140174)
This commit is contained in:
@@ -437,10 +437,10 @@ getUnitForOffset(DIEBuilder &Builder, DWARFContext &DWCtx,
|
||||
// This is a work around for XCode clang. There is a build error when we
|
||||
// pass DWCtx.compile_units() to llvm::upper_bound
|
||||
std::call_once(InitVectorFlag, initCUVector);
|
||||
auto CUIter = std::upper_bound(CUOffsets.begin(), CUOffsets.end(), Offset,
|
||||
[](uint64_t LHS, const DWARFUnit *RHS) {
|
||||
return LHS < RHS->getNextUnitOffset();
|
||||
});
|
||||
auto CUIter = llvm::upper_bound(CUOffsets, Offset,
|
||||
[](uint64_t LHS, const DWARFUnit *RHS) {
|
||||
return LHS < RHS->getNextUnitOffset();
|
||||
});
|
||||
CU = CUIter != CUOffsets.end() ? (*CUIter) : nullptr;
|
||||
}
|
||||
return CU;
|
||||
|
||||
Reference in New Issue
Block a user