[PATCH] D78938: Fixing all comparisons for C++20 compilation.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 00:19:09 PDT 2020
jhenderson added a comment.
In D78938#2259342 <https://reviews.llvm.org/D78938#2259342>, @BRevzin wrote:
> In D78938#2258557 <https://reviews.llvm.org/D78938#2258557>, @jhenderson wrote:
>
>> Not that I have anything particularly against this, but won't this likely rot fairly rapidly? It's not like LLVM is even on C++17 let alone C++20 yet, so trying to make it work like the latter when it's just going to break again seems a bit like wasted effort to me.
>
> People will want to write C++20 programs that use LLVM headers, so I think it's important to help let them do that. Sure, it may rot, but incremental fixes down the line will be smaller.
Makes sense, thanks.
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:805-817
+ return IsASCII ? "^" : (const char *)u8"\u2548";
case LineChar::RangeMid:
- return IsASCII ? "|" : u8"\u2503";
+ return IsASCII ? "|" : (const char *)u8"\u2503";
case LineChar::RangeEnd:
- return IsASCII ? "v" : u8"\u253b";
+ return IsASCII ? "v" : (const char *)u8"\u253b";
case LineChar::LabelVert:
+ return IsASCII ? "|" : (const char *)u8"\u2502";
----------------
BRevzin wrote:
> jhenderson wrote:
> > This seems unrelated to comparison checking?
> > This seems unrelated to comparison checking?
>
> It is unrelated. But In C++20, `u8` literals become their own type so this no longer compiled and I wanted to ensure that I could actually run the tests.
Could it be a pre-requisite patch then?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78938/new/
https://reviews.llvm.org/D78938
More information about the llvm-commits
mailing list