diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-10-24 19:23:39 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-10-24 19:23:39 +0000 |
commit | 6733564e5aff326bffb858fb0b2358905b792f24 (patch) | |
tree | 3aa98ff5a91ac560d2bbb54661df5bedd97e56d1 /llvm/lib/Target/AVR/AVRTargetObjectFile.cpp | |
parent | 87eea10711a610eee827258d510ef9a34dfab73a (diff) | |
download | bcm5719-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/AVR/AVRTargetObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/AVR/AVRTargetObjectFile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/AVR/AVRTargetObjectFile.cpp b/llvm/lib/Target/AVR/AVRTargetObjectFile.cpp index c1d7a4ebc95..af14d9292f2 100644 --- a/llvm/lib/Target/AVR/AVRTargetObjectFile.cpp +++ b/llvm/lib/Target/AVR/AVRTargetObjectFile.cpp @@ -26,16 +26,16 @@ void AVRTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM) { } MCSection * -AVRTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV, +AVRTargetObjectFile::SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { // Global values in flash memory are placed in the progmem.data section // unless they already have a user assigned section. - if (AVR::isProgramMemoryAddress(GV) && !GV->hasSection()) + if (AVR::isProgramMemoryAddress(GO) && !GO->hasSection()) return ProgmemDataSection; // Otherwise, we work the same way as ELF. - return Base::SelectSectionForGlobal(GV, Kind, TM); + return Base::SelectSectionForGlobal(GO, Kind, TM); } } // end of namespace llvm |