Skip to content

Commit 3466b8e

Browse files
committed
[Support] Add const to FileError::getFileName
`getFileName` returns a `StringRef`, there's no reason it shouldn't be const. Differential Revision: https://reviews.llvm.org/D121495
1 parent cc63ae4 commit 3466b8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Support/Error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ class FileError final : public ErrorInfo<FileError> {
12811281
return OS.str();
12821282
}
12831283

1284-
StringRef getFileName() { return FileName; }
1284+
StringRef getFileName() const { return FileName; }
12851285

12861286
Error takeError() { return Error(std::move(Err)); }
12871287

0 commit comments

Comments
 (0)