99#include " ARMTargetObjectFile.h"
1010#include " ARMSubtarget.h"
1111#include " ARMTargetMachine.h"
12+ #include " MCTargetDesc/ARMMCExpr.h"
1213#include " llvm/BinaryFormat/Dwarf.h"
1314#include " llvm/BinaryFormat/ELF.h"
1415#include " llvm/MC/MCAsmInfo.h"
@@ -29,7 +30,7 @@ using namespace dwarf;
2930// ===----------------------------------------------------------------------===//
3031
3132ARMElfTargetObjectFile::ARMElfTargetObjectFile () {
32- PLTRelativeSpecifier = MCSymbolRefExpr::VK_ARM_PREL31 ;
33+ PLTRelativeSpecifier = ARMMCExpr::VK_PREL31 ;
3334 SupportIndirectSymViaGOTPCRel = true ;
3435}
3536
@@ -66,16 +67,15 @@ const MCExpr *ARMElfTargetObjectFile::getIndirectSymViaGOTPCRel(
6667 const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV,
6768 int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const {
6869 int64_t FinalOffset = Offset + MV.getConstant ();
69- const MCExpr *Res = MCSymbolRefExpr::create (
70- Sym, MCSymbolRefExpr::VK_ARM_GOT_PREL , getContext ());
70+ const MCExpr *Res =
71+ MCSymbolRefExpr::create ( Sym, ARMMCExpr::VK_GOT_PREL , getContext ());
7172 const MCExpr *Off = MCConstantExpr::create (FinalOffset, getContext ());
7273 return MCBinaryExpr::createAdd (Res, Off, getContext ());
7374}
7475
7576const MCExpr *ARMElfTargetObjectFile::
7677getIndirectSymViaRWPI (const MCSymbol *Sym) const {
77- return MCSymbolRefExpr::create (Sym, MCSymbolRefExpr::VK_ARM_SBREL,
78- getContext ());
78+ return MCSymbolRefExpr::create (Sym, ARMMCExpr::VK_SBREL, getContext ());
7979}
8080
8181const MCExpr *ARMElfTargetObjectFile::getTTypeGlobalReference (
@@ -87,14 +87,13 @@ const MCExpr *ARMElfTargetObjectFile::getTTypeGlobalReference(
8787
8888 assert (Encoding == DW_EH_PE_absptr && " Can handle absptr encoding only" );
8989
90- return MCSymbolRefExpr::create (TM.getSymbol (GV),
91- MCSymbolRefExpr::VK_ARM_TARGET2, getContext ());
90+ return MCSymbolRefExpr::create (TM.getSymbol (GV), ARMMCExpr::VK_TARGET2,
91+ getContext ());
9292}
9393
9494const MCExpr *ARMElfTargetObjectFile::
9595getDebugThreadLocalSymbol (const MCSymbol *Sym) const {
96- return MCSymbolRefExpr::create (Sym, MCSymbolRefExpr::VK_ARM_TLSLDO,
97- getContext ());
96+ return MCSymbolRefExpr::create (Sym, ARMMCExpr::VK_TLSLDO, getContext ());
9897}
9998
10099static bool isExecuteOnlyFunction (const GlobalObject *GO, SectionKind SK,
0 commit comments