[PATCH] D138594: [AMDGPU][MC] Refactor MC Code Emitter to avoid using magic values

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 01:44:08 PST 2022


dp marked an inline comment as done.
dp added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp:237
     if (!MO.isImm())
-      return ~0;
+      return std::nullopt;
 
----------------
foad wrote:
> You can `return {}` if you prefer.
Thanks, I like it much better than `nullopt`.


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

https://reviews.llvm.org/D138594



More information about the llvm-commits mailing list