[PATCH] D23562: [RISCV 5/10] Add bare-bones RISC-V MCTargetDesc

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 05:22:58 PDT 2016


asb added inline comments.

================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:27
@@ +26,3 @@
+class RISCVAsmBackend : public MCAsmBackend {
+  uint8_t OSABI;
+  bool Is64Bit;
----------------
reames wrote:
> What values can this take?  Is this an enum, or a bitmask?  
Ultimately, it should be one of the `ELFOSABI_*` values defined in `llvm/support/ELF.h`. Except unlike (for instance) `OSType` in Triple.h, the enum has no name. The `uint8_t` type also matches the return type of the static helper `MCELFObjectTargetWriter::getOSABI` which is used to set its value. I think `uint8_t` is therefore the best choice here. The value is never inspected in RISCV backend code anyway, it's just passed around.


https://reviews.llvm.org/D23562





More information about the llvm-commits mailing list