[llvm] [SystemZ] Implement A, O and R inline assembly format flags (PR #80685)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 01:35:43 PST 2024
================
@@ -889,13 +889,17 @@ static void printFormattedRegName(const MCAsmInfo *MAI, unsigned RegNo,
OS << '%' << RegName;
}
+static void printReg(unsigned Reg, const MCAsmInfo *MAI, raw_ostream &OS) {
+ if (!Reg)
+ OS << '0';
+ else
+ printFormattedRegName(MAI, Reg, OS);
+}
+
static void printOperand(const MCOperand &MCOp, const MCAsmInfo *MAI,
raw_ostream &OS) {
if (MCOp.isReg()) {
- if (!MCOp.getReg())
- OS << '0';
- else
- printFormattedRegName(MAI, MCOp.getReg(), OS);
+ printReg(MCOp.getReg(), MAI, OS);
} else if (MCOp.isImm())
----------------
uweigand wrote:
Cosmetic nit: please remove the braces as well then.
https://github.com/llvm/llvm-project/pull/80685
More information about the llvm-commits
mailing list