[PATCH] D142170: [AVR][NFC] Refactor 'AVRAsmPrinter::PrintAsmOperand'

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 18:13:35 PST 2023


benshi001 added inline comments.


================
Comment at: llvm/lib/Target/AVR/AVRAsmPrinter.cpp:111
+    // Unknown extra code.
+    if (ExtraCode[1] != 0 || ExtraCode[0] < 'A' || ExtraCode[0] > 'Z')
+      return true;
----------------
Chenbing.Zheng wrote:
> It seems that //ExtraCode[0] < 'A' || ExtraCode[0] > 'Z'// will return false according to the original logic ?
The orginal logic is wrong. Returning false means success, while true means failure. This is the logic of https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/AsmPrinter.h#L787



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142170/new/

https://reviews.llvm.org/D142170



More information about the llvm-commits mailing list