Differential Revision: https://reviews.llvm.org/D98929
StringRef RISCVMCExpr::getVariantKindName(VariantKind Kind) {
switch (Kind) {
- default:
+ case VK_RISCV_Invalid:
+ case VK_RISCV_None:
llvm_unreachable("Invalid ELF symbol kind");
case VK_RISCV_LO:
return "lo";
return "tls_ie_pcrel_hi";
case VK_RISCV_TLS_GD_HI:
return "tls_gd_pcrel_hi";
+ case VK_RISCV_CALL:
+ return "call";
+ case VK_RISCV_CALL_PLT:
+ return "call_plt";
+ case VK_RISCV_32_PCREL:
+ return "32_pcrel";
}
+ llvm_unreachable("Invalid ELF symbol kind");
}
static void fixELFSymbolsInTLSFixupsImpl(const MCExpr *Expr, MCAssembler &Asm) {
VK_RISCV_CALL,
VK_RISCV_CALL_PLT,
VK_RISCV_32_PCREL,
- VK_RISCV_Invalid
+ VK_RISCV_Invalid // Must be the last item
};
private: