@@ -144,12 +144,12 @@ enum {
144144class PPCAsmPrinter : public AsmPrinter {
145145protected:
146146 // 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
148148 // entries. So each entry is represented by a pair of MCSymbol and
149149 // VariantKind. For example, we need to be able to identify the following
150150 // entry as a TLSGD entry so we can add the @m relocation:
151151 // .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 .
153153 MapVector<std::pair<const MCSymbol *, PPCMCExpr::Specifier>, MCSymbol *> TOC;
154154 const PPCSubtarget *Subtarget = nullptr ;
155155
@@ -732,8 +732,7 @@ void PPCAsmPrinter::emitTlsCall(const MachineInstr *MI,
732732 if (Subtarget->is32BitELFABI () && isPositionIndependent ())
733733 Kind = PPC::S_PLT;
734734
735- const MCExpr *TlsRef = MCSymbolRefExpr::create (
736- TlsGetAddr, MCSymbolRefExpr::VariantKind (Kind), OutContext);
735+ const MCExpr *TlsRef = MCSymbolRefExpr::create (TlsGetAddr, Kind, OutContext);
737736
738737 // Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
739738 if (Kind == PPC::S_PLT && Subtarget->isSecurePlt () &&
@@ -743,8 +742,7 @@ void PPCAsmPrinter::emitTlsCall(const MachineInstr *MI,
743742 const MachineOperand &MO = MI->getOperand (2 );
744743 const GlobalValue *GValue = MO.getGlobal ();
745744 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);
748746 EmitToStreamer (*OutStreamer,
749747 MCInstBuilder (Subtarget->isPPC64 () ? Opcode
750748 : (unsigned )PPC::BL_TLS)
@@ -801,8 +799,7 @@ getTOCEntryTypeForMO(const MachineOperand &MO) {
801799
802800const MCExpr *PPCAsmPrinter::symbolWithSpecifier (const MCSymbol *S,
803801 PPCMCExpr::Specifier Spec) {
804- return MCSymbolRefExpr::create (S, MCSymbolRefExpr::VariantKind (Spec),
805- OutContext);
802+ return MCSymbolRefExpr::create (S, Spec, OutContext);
806803}
807804
808805// / EmitInstruction -- Print out a single PowerPC MI in Darwin syntax to
@@ -954,8 +951,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
954951 MCSymbol *GOTSymbol =
955952 OutContext.getOrCreateSymbol (StringRef (" _GLOBAL_OFFSET_TABLE_" ));
956953 const MCExpr *OffsExpr = MCBinaryExpr::createSub (
957- MCSymbolRefExpr::create (
958- GOTSymbol, MCSymbolRefExpr::VariantKind (PPC::S_LOCAL), OutContext),
954+ MCSymbolRefExpr::create (GOTSymbol, PPC::S_LOCAL, OutContext),
959955 MCConstantExpr::create (4 , OutContext), OutContext);
960956
961957 // Emit the 'bl'.
@@ -1331,9 +1327,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
13311327 const MCSymbol *const MOSymbol = getMCSymbolForTOCPseudoMO (MO, *this );
13321328
13331329 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);
13371331
13381332 TmpInst.getOperand (2 ) = MCOperand::createExpr (Exp);
13391333 EmitToStreamer (*OutStreamer, TmpInst);
@@ -1728,8 +1722,7 @@ PPCAsmPrinter::getAdjustedFasterLocalExpr(const MachineOperand &MO,
17281722 // assume that the address of extern TLS variables are zero.
17291723 const MCExpr *Expr = MCSymbolRefExpr::create (
17301724 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),
17331726 OutContext);
17341727 Expr = MCBinaryExpr::createAdd (
17351728 Expr, MCConstantExpr::create (Offset, OutContext), OutContext);
@@ -2017,9 +2010,7 @@ void PPCLinuxAsmPrinter::emitFunctionEntryLabel() {
20172010 MCSymbol *Symbol2 = OutContext.getOrCreateSymbol (StringRef (" .TOC." ));
20182011 // Generates a R_PPC64_TOC relocation for TOC base insertion.
20192012 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*/ );
20232014 // Emit a null environment pointer.
20242015 OutStreamer->emitIntValue (0 , 8 /* size */ );
20252016 OutStreamer->switchSection (Current.first , Current.second );
0 commit comments