@@ -249,16 +249,6 @@ class MCSymbolRefExpr : public MCExpr {
249249
250250 VK_COFF_IMGREL32, // symbol@imgrel (image-relative)
251251
252- VK_Hexagon_LO16,
253- VK_Hexagon_HI16,
254- VK_Hexagon_GPREL,
255- VK_Hexagon_GD_GOT,
256- VK_Hexagon_LD_GOT,
257- VK_Hexagon_GD_PLT,
258- VK_Hexagon_LD_PLT,
259- VK_Hexagon_IE,
260- VK_Hexagon_IE_GOT,
261-
262252 VK_WASM_TYPEINDEX, // Reference to a symbol's type (signature)
263253 VK_WASM_TLSREL, // Memory address relative to __tls_base
264254 VK_WASM_MBREL, // Memory address relative to __memory_base
@@ -310,6 +300,10 @@ class MCSymbolRefExpr : public MCExpr {
310300
311301 static const MCSymbolRefExpr *create (const MCSymbol *Symbol, VariantKind Kind,
312302 MCContext &Ctx, SMLoc Loc = SMLoc());
303+ static const MCSymbolRefExpr *create (const MCSymbol *Symbol, uint16_t Kind,
304+ MCContext &Ctx, SMLoc Loc = SMLoc()) {
305+ return MCSymbolRefExpr::create (Symbol, VariantKind (Kind), Ctx, Loc);
306+ }
313307
314308 // / @}
315309 // / \name Accessors
@@ -577,7 +571,9 @@ class MCTargetExpr : public MCExpr {
577571 virtual void visitUsedExpr (MCStreamer& Streamer) const = 0;
578572 virtual MCFragment *findAssociatedFragment () const = 0;
579573
580- virtual void fixELFSymbolsInTLSFixups (MCAssembler &) const = 0;
574+ // Deprecated way to set the type of referenced ELF symbols to STT_TLS when
575+ // the derived MCELFObjectTargetWriter::getRelocType does not update symbols.
576+ virtual void fixELFSymbolsInTLSFixups (MCAssembler &) const {}
581577
582578 static bool classof (const MCExpr *E) {
583579 return E->getKind () == MCExpr::Target;
0 commit comments