[PATCH] D143471: [X86][MC][NFC] Refine code in X86MCCodeEmitter.cpp about opcode prefix

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 09:14:00 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1135
   }
+  PrefixKind Kind = Prefix.getKind(VEX2);
+  Prefix.setKind(Kind);
----------------
The names of these functions is confusing. getKind followed by setKind looks odd. I would naively expect setKind to set the thing that getKind returns. So getKind followed by setKind looks redundant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143471



More information about the llvm-commits mailing list