@@ -144,12 +144,12 @@ enum {
144
144
class PPCAsmPrinter : public AsmPrinter {
145
145
protected:
146
146
// For TLS on AIX, we need to be able to identify TOC entries of specific
147
- // VariantKind so we can add the right relocations when we generate the
147
+ // specifier so we can add the right relocations when we generate the
148
148
// entries. So each entry is represented by a pair of MCSymbol and
149
149
// VariantKind. For example, we need to be able to identify the following
150
150
// entry as a TLSGD entry so we can add the @m relocation:
151
151
// .tc .i[TC],i[TL]@m
152
- // By default, VK_None is used for the VariantKind .
152
+ // By default, 0 is used for the specifier .
153
153
MapVector<std::pair<const MCSymbol *, PPCMCExpr::Specifier>, MCSymbol *> TOC;
154
154
const PPCSubtarget *Subtarget = nullptr ;
155
155
@@ -732,8 +732,7 @@ void PPCAsmPrinter::emitTlsCall(const MachineInstr *MI,
732
732
if (Subtarget->is32BitELFABI () && isPositionIndependent ())
733
733
Kind = PPC::S_PLT;
734
734
735
- const MCExpr *TlsRef = MCSymbolRefExpr::create (
736
- TlsGetAddr, MCSymbolRefExpr::VariantKind (Kind), OutContext);
735
+ const MCExpr *TlsRef = MCSymbolRefExpr::create (TlsGetAddr, Kind, OutContext);
737
736
738
737
// Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
739
738
if (Kind == PPC::S_PLT && Subtarget->isSecurePlt () &&
@@ -743,8 +742,7 @@ void PPCAsmPrinter::emitTlsCall(const MachineInstr *MI,
743
742
const MachineOperand &MO = MI->getOperand (2 );
744
743
const GlobalValue *GValue = MO.getGlobal ();
745
744
MCSymbol *MOSymbol = getSymbol (GValue);
746
- const MCExpr *SymVar = MCSymbolRefExpr::create (
747
- MOSymbol, MCSymbolRefExpr::VariantKind (VK), OutContext);
745
+ const MCExpr *SymVar = MCSymbolRefExpr::create (MOSymbol, VK, OutContext);
748
746
EmitToStreamer (*OutStreamer,
749
747
MCInstBuilder (Subtarget->isPPC64 () ? Opcode
750
748
: (unsigned )PPC::BL_TLS)
@@ -801,8 +799,7 @@ getTOCEntryTypeForMO(const MachineOperand &MO) {
801
799
802
800
const MCExpr *PPCAsmPrinter::symbolWithSpecifier (const MCSymbol *S,
803
801
PPCMCExpr::Specifier Spec) {
804
- return MCSymbolRefExpr::create (S, MCSymbolRefExpr::VariantKind (Spec),
805
- OutContext);
802
+ return MCSymbolRefExpr::create (S, Spec, OutContext);
806
803
}
807
804
808
805
// / EmitInstruction -- Print out a single PowerPC MI in Darwin syntax to
@@ -954,8 +951,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
954
951
MCSymbol *GOTSymbol =
955
952
OutContext.getOrCreateSymbol (StringRef (" _GLOBAL_OFFSET_TABLE_" ));
956
953
const MCExpr *OffsExpr = MCBinaryExpr::createSub (
957
- MCSymbolRefExpr::create (
958
- GOTSymbol, MCSymbolRefExpr::VariantKind (PPC::S_LOCAL), OutContext),
954
+ MCSymbolRefExpr::create (GOTSymbol, PPC::S_LOCAL, OutContext),
959
955
MCConstantExpr::create (4 , OutContext), OutContext);
960
956
961
957
// Emit the 'bl'.
@@ -1331,9 +1327,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
1331
1327
const MCSymbol *const MOSymbol = getMCSymbolForTOCPseudoMO (MO, *this );
1332
1328
1333
1329
const MCExpr *Exp = MCSymbolRefExpr::create (
1334
- MOSymbol,
1335
- MCSymbolRefExpr::VariantKind (IsAIX ? PPC::S_L : PPC::S_TOC_LO),
1336
- OutContext);
1330
+ MOSymbol, IsAIX ? PPC::S_L : PPC::S_TOC_LO, OutContext);
1337
1331
1338
1332
TmpInst.getOperand (2 ) = MCOperand::createExpr (Exp);
1339
1333
EmitToStreamer (*OutStreamer, TmpInst);
@@ -1728,8 +1722,7 @@ PPCAsmPrinter::getAdjustedFasterLocalExpr(const MachineOperand &MO,
1728
1722
// assume that the address of extern TLS variables are zero.
1729
1723
const MCExpr *Expr = MCSymbolRefExpr::create (
1730
1724
getSymbol (GValue),
1731
- MCSymbolRefExpr::VariantKind (
1732
- Model == TLSModel::LocalExec ? PPC::S_AIX_TLSLE : PPC::S_AIX_TLSLD),
1725
+ (Model == TLSModel::LocalExec ? PPC::S_AIX_TLSLE : PPC::S_AIX_TLSLD),
1733
1726
OutContext);
1734
1727
Expr = MCBinaryExpr::createAdd (
1735
1728
Expr, MCConstantExpr::create (Offset, OutContext), OutContext);
@@ -2017,9 +2010,7 @@ void PPCLinuxAsmPrinter::emitFunctionEntryLabel() {
2017
2010
MCSymbol *Symbol2 = OutContext.getOrCreateSymbol (StringRef (" .TOC." ));
2018
2011
// Generates a R_PPC64_TOC relocation for TOC base insertion.
2019
2012
OutStreamer->emitValue (
2020
- MCSymbolRefExpr::create (
2021
- Symbol2, MCSymbolRefExpr::VariantKind (PPC::S_TOCBASE), OutContext),
2022
- 8 /* size*/ );
2013
+ MCSymbolRefExpr::create (Symbol2, PPC::S_TOCBASE, OutContext), 8 /* size*/ );
2023
2014
// Emit a null environment pointer.
2024
2015
OutStreamer->emitIntValue (0 , 8 /* size */ );
2025
2016
OutStreamer->switchSection (Current.first , Current.second );
0 commit comments