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/Mips/MipsTargetObjectFile.h | |
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/Mips/MipsTargetObjectFile.h')
-rw-r--r-- | llvm/lib/Target/Mips/MipsTargetObjectFile.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetObjectFile.h b/llvm/lib/Target/Mips/MipsTargetObjectFile.h index e88a73aa3f8..e5423f9578a 100644 --- a/llvm/lib/Target/Mips/MipsTargetObjectFile.h +++ b/llvm/lib/Target/Mips/MipsTargetObjectFile.h @@ -18,20 +18,21 @@ class MipsTargetMachine; MCSection *SmallDataSection; MCSection *SmallBSSSection; const MipsTargetMachine *TM; + + bool IsGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM, + SectionKind Kind) const; + bool IsGlobalInSmallSectionImpl(const GlobalObject *GO, + const TargetMachine &TM) const; public: void Initialize(MCContext &Ctx, const TargetMachine &TM) override; /// Return true if this global address should be placed into small data/bss /// section. - bool IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, - SectionKind Kind) const; - bool IsGlobalInSmallSection(const GlobalValue *GV, + bool IsGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const; - bool IsGlobalInSmallSectionImpl(const GlobalValue *GV, - const TargetMachine &TM) const; - MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, + MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override; /// Return true if this constant should be placed into small data section. |