summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-10-24 19:23:39 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-10-24 19:23:39 +0000
commit6733564e5aff326bffb858fb0b2358905b792f24 (patch)
tree3aa98ff5a91ac560d2bbb54661df5bedd97e56d1 /llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp
parent87eea10711a610eee827258d510ef9a34dfab73a (diff)
downloadbcm5719-llvm-6733564e5aff326bffb858fb0b2358905b792f24.tar.gz
bcm5719-llvm-6733564e5aff326bffb858fb0b2358905b792f24.zip
Target: Change various section classifiers in TargetLoweringObjectFile to take a GlobalObject.
These functions are about classifying a global which will actually be emitted, so it does not make sense for them to take a GlobalValue which may for example be an alias. Change the Mach-O object writer and the Hexagon, Lanai and MIPS backends to look through aliases before using TargetLoweringObjectFile interfaces. These are functional changes but all appear to be bug fixes. Differential Revision: https://reviews.llvm.org/D25917 llvm-svn: 285006
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp
index 1dbb8a3a77f..1fddc88a705 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp
@@ -21,10 +21,10 @@ using namespace llvm;
//===----------------------------------------------------------------------===//
MCSection *AMDGPUTargetObjectFile::SelectSectionForGlobal(
- const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const {
- if (Kind.isReadOnly() && AMDGPU::isReadOnlySegment(GV) &&
+ const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {
+ if (Kind.isReadOnly() && AMDGPU::isReadOnlySegment(GO) &&
AMDGPU::shouldEmitConstantsToTextSection(TM.getTargetTriple()))
return TextSection;
- return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, TM);
+ return TargetLoweringObjectFileELF::SelectSectionForGlobal(GO, Kind, TM);
}
OpenPOWER on IntegriCloud