[PATCH] D142170: [AVR][NFC] Refactor 'AVRAsmPrinter::PrintAsmOperand'
    Ben Shi via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jan 19 18:47:31 PST 2023
    
    
  
benshi001 added inline comments.
================
Comment at: llvm/lib/Target/AVR/AVRAsmPrinter.cpp:113
 
-      assert(RegOp.isReg() && "Operand must be a register when you're"
-                              "using 'A'..'Z' operand extracodes.");
----------------
We should not use `assert` here, since the case we checked is user illegal input, it would be better to return `true` and let the llvm framework to give the error message.
And I combine the check with the above `if` check.
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