Skip to content

Commit 7ccdffc

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 f06864b commit 7ccdffc

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
@@ -1283,7 +1283,7 @@ class FileError final : public ErrorInfo<FileError> {
12831283
return OS.str();
12841284
}
12851285

1286-
StringRef getFileName() { return FileName; }
1286+
StringRef getFileName() const { return FileName; }
12871287

12881288
Error takeError() { return Error(std::move(Err)); }
12891289

0 commit comments

Comments
 (0)