Skip to content

Commit

Permalink
[TLI] Remove leftover assert in TargetLibraryInfoImpl initialize (#79056
Browse files Browse the repository at this point in the history
)

Remove unnecessary assert for a sorted StandardNames after
implementation of getLibFunc is changed from binary search to a DenseMap
Lookup in commit 7d950f0.

The original getLibFunc binary search implementation is in commit
c740e3f.

Co-authored-by: Tony Tao <tonytao@ca.ibm.com>
  • Loading branch information
tltao and Tony Tao committed Jan 23, 2024
1 parent 1715866 commit fd9b337
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions llvm/lib/Analysis/TargetLibraryInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ bool TargetLibraryInfoImpl::isCallingConvCCompatible(Function *F) {
/// triple gets a sane set of defaults.
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
ArrayRef<StringLiteral> StandardNames) {
// Verify that the StandardNames array is in alphabetical order.
assert(
llvm::is_sorted(StandardNames,
[](StringRef LHS, StringRef RHS) { return LHS < RHS; }) &&
"TargetLibraryInfoImpl function names must be sorted");

// Set IO unlocked variants as unavailable
// Set them as available per system below
TLI.setUnavailable(LibFunc_getc_unlocked);
Expand Down

0 comments on commit fd9b337

Please sign in to comment.