Skip to content

Commit a83668c

Browse files
[BOLT] Use llvm::upper_bound (NFC) (#140174)
1 parent 5ca94f9 commit a83668c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bolt/lib/Core/DIEBuilder.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ getUnitForOffset(DIEBuilder &Builder, DWARFContext &DWCtx,
437437
// This is a work around for XCode clang. There is a build error when we
438438
// pass DWCtx.compile_units() to llvm::upper_bound
439439
std::call_once(InitVectorFlag, initCUVector);
440-
auto CUIter = std::upper_bound(CUOffsets.begin(), CUOffsets.end(), Offset,
441-
[](uint64_t LHS, const DWARFUnit *RHS) {
442-
return LHS < RHS->getNextUnitOffset();
443-
});
440+
auto CUIter = llvm::upper_bound(CUOffsets, Offset,
441+
[](uint64_t LHS, const DWARFUnit *RHS) {
442+
return LHS < RHS->getNextUnitOffset();
443+
});
444444
CU = CUIter != CUOffsets.end() ? (*CUIter) : nullptr;
445445
}
446446
return CU;

0 commit comments

Comments
 (0)