[PATCH] D155058: [Remark] Overload `<<` for Remark, RemarkType and RemarkLocation.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 17:39:45 PDT 2023
JDevlieghere added inline comments.
================
Comment at: llvm/include/llvm/Remarks/Remark.h:38
+ /// Implement operator<< on RemarkLocation.
+ /// @{
+ void print(raw_ostream &OS) const;
----------------
Doesn't look like you need the grouping here. Similar comment below.
================
Comment at: llvm/include/llvm/Remarks/Remark.h:75-92
+inline std::string typeToStr(Type Ty) {
+ switch (Ty) {
+ case Type::Unknown:
+ return "Unknown";
+ case Type::Missed:
+ return "Missed";
+ case Type::Passed:
----------------
Given that there are all string literals, this function should return a `StringRef` and avoid the `std::string` allocation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155058/new/
https://reviews.llvm.org/D155058
More information about the llvm-commits
mailing list