[PATCH] D132119: [MC][LoongArch] Make .reloc support arbitrary relocation types

WÁNG Xuěruì via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 03:16:11 PDT 2022


xen0n added a comment.

Only one minor nit. Thanks.



================
Comment at: llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp:27-28
+  if (STI.getTargetTriple().isOSBinFormatELF()) {
+    unsigned Type;
+    Type = llvm::StringSwitch<unsigned>(Name)
+#define ELF_RELOC(X, Y) .Case(#X, Y)
----------------
could simplify a bit, to `auto Type = ...`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132119



More information about the llvm-commits mailing list