[PATCH] D148861: [Demangle] fix another test on windows
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 17:06:28 PDT 2023
nickdesaulniers created this revision.
nickdesaulniers added a reviewer: ayzhao.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Alan spotted another test failure that was a result of
https://reviews.llvm.org/D148546 when running expensive checks tests
locally on windows.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148861
Files:
llvm/lib/ProfileData/ItaniumManglingCanonicalizer.cpp
Index: llvm/lib/ProfileData/ItaniumManglingCanonicalizer.cpp
===================================================================
--- llvm/lib/ProfileData/ItaniumManglingCanonicalizer.cpp
+++ llvm/lib/ProfileData/ItaniumManglingCanonicalizer.cpp
@@ -23,7 +23,10 @@
llvm::FoldingSetNodeID &ID;
void operator()(const Node *P) { ID.AddPointer(P); }
void operator()(std::string_view Str) {
- ID.AddString(llvm::StringRef(&*Str.begin(), Str.size()));
+ if (Str.empty())
+ ID.AddString({});
+ else
+ ID.AddString(llvm::StringRef(&*Str.begin(), Str.size()));
}
template <typename T>
std::enable_if_t<std::is_integral_v<T> || std::is_enum_v<T>> operator()(T V) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148861.515537.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230421/8aac8914/attachment.bin>
More information about the llvm-commits
mailing list