[PATCH] D98929: Add missing cases in RISCVMCExpr::getVariantKindName
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 22:58:18 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGddb0bcbdff03: Add missing cases in RISCVMCExpr::getVariantKindName (authored by sepavloff).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98929/new/
https://reviews.llvm.org/D98929
Files:
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
Index: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
===================================================================
--- llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
+++ llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.h
@@ -37,7 +37,7 @@
VK_RISCV_CALL,
VK_RISCV_CALL_PLT,
VK_RISCV_32_PCREL,
- VK_RISCV_Invalid
+ VK_RISCV_Invalid // Must be the last item
};
private:
Index: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
===================================================================
--- llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
+++ llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
@@ -138,7 +138,8 @@
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";
@@ -160,7 +161,14 @@
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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98929.333212.patch
Type: text/x-patch
Size: 1289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210325/25f241a1/attachment.bin>
More information about the llvm-commits
mailing list