Skip to content

Commit aaa8a80

Browse files
[CodeGen] Use operator==(StringRef, StringRef) (NFC)
The LHS and RHS are of SmallString and StringRef, respectively. We can safely use operator==(StringRef, SringRef) with one implicit conversion from SmallString to StringRef.
1 parent d395b56 commit aaa8a80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/BasicBlockSectionsProfileReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Error BasicBlockSectionsProfileReader::ReadV1Profile() {
170170
return false;
171171
// Return a match if debug-info-filename is not specified. Otherwise,
172172
// check for equality.
173-
return DIFilename.empty() || It->second.equals(DIFilename);
173+
return DIFilename.empty() || It->second == DIFilename;
174174
});
175175
if (!FunctionFound) {
176176
// Skip the following profile by setting the profile iterator (FI) to
@@ -317,7 +317,7 @@ Error BasicBlockSectionsProfileReader::ReadV0Profile() {
317317
return false;
318318
// Return a match if debug-info-filename is not specified. Otherwise,
319319
// check for equality.
320-
return DIFilename.empty() || It->second.equals(DIFilename);
320+
return DIFilename.empty() || It->second == DIFilename;
321321
});
322322
if (!FunctionFound) {
323323
// Skip the following profile by setting the profile iterator (FI) to

0 commit comments

Comments
 (0)