diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
| commit | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch) | |
| tree | 98b8f811c7aff2547cab8642daf372d6c59502fb /lib/Target/PowerPC/PPCTargetObjectFile.cpp | |
| parent | 6421cca32f69ac849537a3cff78c352195e99f1b (diff) | |
Notes
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetObjectFile.cpp')
| -rw-r--r-- | lib/Target/PowerPC/PPCTargetObjectFile.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/PowerPC/PPCTargetObjectFile.cpp b/lib/Target/PowerPC/PPCTargetObjectFile.cpp index 8f660355c0ac..a049dc3fda93 100644 --- a/lib/Target/PowerPC/PPCTargetObjectFile.cpp +++ b/lib/Target/PowerPC/PPCTargetObjectFile.cpp @@ -23,8 +23,7 @@ Initialize(MCContext &Ctx, const TargetMachine &TM) { } MCSection *PPC64LinuxTargetObjectFile::SelectSectionForGlobal( - const GlobalValue *GV, SectionKind Kind, Mangler &Mang, - const TargetMachine &TM) const { + const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { // Here override ReadOnlySection to DataRelROSection for PPC64 SVR4 ABI // when we have a constant that contains global relocations. This is // necessary because of this ABI's handling of pointers to functions in @@ -40,14 +39,13 @@ MCSection *PPC64LinuxTargetObjectFile::SelectSectionForGlobal( // For more information, see the description of ELIMINATE_COPY_RELOCS in // GNU ld. if (Kind.isReadOnly()) { - const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV); + const auto *GVar = dyn_cast<GlobalVariable>(GO); if (GVar && GVar->isConstant() && GVar->getInitializer()->needsRelocation()) Kind = SectionKind::getReadOnlyWithRel(); } - return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, - Mang, TM); + return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM); } const MCExpr *PPC64LinuxTargetObjectFile:: |
