[PATCH] D80953: [AIX] asm output: use character literals in byte lists for strings

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 15:14:05 PDT 2020


daltenty added inline comments.


================
Comment at: llvm/lib/MC/MCAsmStreamer.cpp:905
+    if (isPrint(C)) {
+      OS << format(CharacterLiteralFormatString, static_cast<char>(C));
+      return;
----------------
hubert.reinterpretcast wrote:
> May need to hedge against `-Werror,-Wformat-security` warning as seen recently on another commit.
I'm assuming specifically we're worried about `-Wformat-nonliteral`. 

I think the MAI property supporting other arbitrary character formatting strings is a nice to have, but not essential to this patch, since AIX is currently the only user. We could simplify to the just supporting a character prefix (single quote in our case) or something like that so we can use a fixed format for the character itself.


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