From 87a6f756c2a3715f0d7894a47cf960d9e3100283 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 15 Mar 2016 17:29:52 +0000 Subject: [PATCH] [MC] Rename TLSDESC as it's not ARM specific. Similarly to what was done for TLSCALL in r263515. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263564 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCExpr.h | 2 +- lib/MC/MCExpr.cpp | 4 ++-- lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/MC/MCExpr.h b/include/llvm/MC/MCExpr.h index ce20be72808..d1ab855d157 100644 --- a/include/llvm/MC/MCExpr.h +++ b/include/llvm/MC/MCExpr.h @@ -178,6 +178,7 @@ public: VK_TPOFF, VK_DTPOFF, VK_TLSCALL, // symbol(tlscall) + VK_TLSDESC, // symbol(tlsdesc) VK_TLVP, // Mach-O thread local variable relocations VK_TLVPPAGE, VK_TLVPPAGEOFF, @@ -196,7 +197,6 @@ public: VK_ARM_PREL31, VK_ARM_SBREL, // symbol(sbrel) VK_ARM_TLSLDO, // symbol(tlsldo) - VK_ARM_TLSDESC, // symbol(tlsdesc) VK_ARM_TLSDESCSEQ, VK_PPC_LO, // symbol@l diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index 0b998371793..c74db853ebf 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -195,6 +195,7 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) { case VK_TPOFF: return "TPOFF"; case VK_TPREL: return "TPREL"; case VK_TLSCALL: return "tlscall"; + case VK_TLSDESC: return "tlsdesc"; case VK_TLVP: return "TLVP"; case VK_TLVPPAGE: return "TLVPPAGE"; case VK_TLVPPAGEOFF: return "TLVPPAGEOFF"; @@ -212,7 +213,6 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) { case VK_ARM_PREL31: return "prel31"; case VK_ARM_SBREL: return "sbrel"; case VK_ARM_TLSLDO: return "tlsldo"; - case VK_ARM_TLSDESC: return "tlsdesc"; case VK_ARM_TLSDESCSEQ: return "tlsdescseq"; case VK_PPC_LO: return "l"; case VK_PPC_HI: return "h"; @@ -321,6 +321,7 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) { .Case("gotntpoff", VK_GOTNTPOFF) .Case("plt", VK_PLT) .Case("tlscall", VK_TLSCALL) + .Case("tlsdesc", VK_TLSDESC) .Case("tlsgd", VK_TLSGD) .Case("tlsld", VK_TLSLD) .Case("tlsldm", VK_TLSLDM) @@ -398,7 +399,6 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) { .Case("prel31", VK_ARM_PREL31) .Case("sbrel", VK_ARM_SBREL) .Case("tlsldo", VK_ARM_TLSLDO) - .Case("tlsdesc", VK_ARM_TLSDESC) .Default(VK_Invalid); } diff --git a/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp b/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp index 18d2aa6488b..d618df446fc 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp @@ -216,7 +216,7 @@ unsigned ARMELFObjectWriter::GetRelocTypeInner(const MCValue &Target, case MCSymbolRefExpr::VK_TLSCALL: Type = ELF::R_ARM_TLS_CALL; break; - case MCSymbolRefExpr::VK_ARM_TLSDESC: + case MCSymbolRefExpr::VK_TLSDESC: Type = ELF::R_ARM_TLS_GOTDESC; break; case MCSymbolRefExpr::VK_ARM_TLSDESCSEQ: