Skip to content

Commit 0577240

Browse files
[Utils] Use StringRef::ends_with (NFC) (#135934)
1 parent 842bc07 commit 0577240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ static Value *optimizeDoubleFP(CallInst *CI, IRBuilderBase &B,
19361936
bool IsIntrinsic = CalleeFn->isIntrinsic();
19371937
if (!IsIntrinsic) {
19381938
StringRef CallerName = CI->getFunction()->getName();
1939-
if (!CallerName.empty() && CallerName.back() == 'f' &&
1939+
if (CallerName.ends_with('f') &&
19401940
CallerName.size() == (CalleeName.size() + 1) &&
19411941
CallerName.starts_with(CalleeName))
19421942
return nullptr;

0 commit comments

Comments
 (0)