aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips/MipsTargetAsmInfo.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-07-30 17:04:04 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-07-30 17:04:04 +0000
commit91c2adabc2599fac910d6aef0e73f87a3cec510f (patch)
treee7c771fd390e954c79bdde5366c66fecff56b71a /lib/Target/Mips/MipsTargetAsmInfo.cpp
parent10ff0390922080f9a619f410efdfe3bc35774d19 (diff)
downloadexternal_llvm-91c2adabc2599fac910d6aef0e73f87a3cec510f.zip
external_llvm-91c2adabc2599fac910d6aef0e73f87a3cec510f.tar.gz
external_llvm-91c2adabc2599fac910d6aef0e73f87a3cec510f.tar.bz2
Removed small section flag for mips, the assembler doesnt support this flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsTargetAsmInfo.cpp')
-rw-r--r--lib/Target/Mips/MipsTargetAsmInfo.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/Target/Mips/MipsTargetAsmInfo.cpp b/lib/Target/Mips/MipsTargetAsmInfo.cpp
index f8a14c6..5c671cc 100644
--- a/lib/Target/Mips/MipsTargetAsmInfo.cpp
+++ b/lib/Target/Mips/MipsTargetAsmInfo.cpp
@@ -45,8 +45,16 @@ MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM):
}
-SectionKind::Kind
-MipsTargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const {
+unsigned MipsTargetAsmInfo::
+SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
+ unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
+ // Mask out Small Section flag bit, Mips doesnt support 's' section symbol
+ // for its small sections.
+ return (Flags & (~SectionFlags::Small));
+}
+
+SectionKind::Kind MipsTargetAsmInfo::
+SectionKindForGlobal(const GlobalValue *GV) const {
SectionKind::Kind K = ELFTargetAsmInfo::SectionKindForGlobal(GV);
if (Subtarget->hasABICall())
@@ -72,8 +80,8 @@ MipsTargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const {
return K;
}
-const Section*
-MipsTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
+const Section* MipsTargetAsmInfo::
+SelectSectionForGlobal(const GlobalValue *GV) const {
SectionKind::Kind K = SectionKindForGlobal(GV);
const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV);