[PATCH] D80953: [AIX] asm output: use character literals in byte lists for strings
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 12:42:53 PDT 2020
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/lib/MC/MCAsmStreamer.cpp:966
if (Data.size() == 1 ||
- !(MAI->getAscizDirective() || MAI->getAsciiDirective())) {
+ !(MAI->getAscizDirective() || MAI->getAsciiDirective() ||
+ MAI->getByteListDirective())) {
----------------
daltenty wrote:
> Why not ward off trouble below and just make the check reflect whether `AsciizDirective` is actually usable in this case upfront?
>
> ```
> Data.size() == 1 || !(MAI->getAsciiDirective() || MAI->getByteListDirective() || MAI->getAsciizDirective() && Data.back() == 0)
> ```
I've refactored to remove the duplication of the conditions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80953/new/
https://reviews.llvm.org/D80953
More information about the llvm-commits
mailing list