[PATCH] D121495: [Support] Add const to `FileError::getFileName`
Ben Barham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 14:38:12 PST 2022
bnbarham created this revision.
Herald added a subscriber: dexonsmith.
Herald added a project: All.
bnbarham requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`getFileName` returns a `StringRef`, there's no reason it shouldn't be
const.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121495
Files:
llvm/include/llvm/Support/Error.h
Index: llvm/include/llvm/Support/Error.h
===================================================================
--- llvm/include/llvm/Support/Error.h
+++ llvm/include/llvm/Support/Error.h
@@ -1281,7 +1281,7 @@
return OS.str();
}
- StringRef getFileName() { return FileName; }
+ StringRef getFileName() const { return FileName; }
Error takeError() { return Error(std::move(Err)); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121495.414754.patch
Type: text/x-patch
Size: 397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220311/37a5e6de/attachment.bin>
More information about the llvm-commits
mailing list