Skip to content

Commit 0fc4e30

Browse files
authored
[Support] Don't use StringRef::equals in Path.inc (#98839)
The removal of StringRef::equals in 3fa409f broke the [Solaris/sparcv9](https://lab.llvm.org/buildbot/#/builders/13/builds/724) and [Solaris/amd64](https://lab.llvm.org/staging/#/builders/94/builds/5176) buildbots: ``` In file included from /vol/llvm/src/llvm-project/git/llvm/lib/Support/Path.cpp:1200: /vol/llvm/src/llvm-project/git/llvm/lib/Support/Unix/Path.inc:519:18: error: no member named 'equals' in 'llvm::StringRef' 519 | return !fstype.equals("nfs"); | ~~~~~~ ^ ``` Fixed by switching to `operator!=` instead. Tested on sparcv9-sun-solaris2.11 and amd64-pc-solaris2.11.
1 parent 6ffa995 commit 0fc4e30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Unix/Path.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static bool is_local_impl(struct STATVFS &Vfs) {
516516
// target
517517
StringRef fstype(Vfs.f_basetype);
518518
// NFS is the only non-local fstype??
519-
return !fstype.equals("nfs");
519+
return fstype != "nfs";
520520
#elif defined(_AIX)
521521
// Call mntctl; try more than twice in case of timing issues with a concurrent
522522
// mount.

0 commit comments

Comments
 (0)