diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 10 | ||||
-rw-r--r-- | lib/CodeGen/ELFWriter.cpp | 11 | ||||
-rw-r--r-- | lib/Target/DarwinTargetAsmInfo.cpp | 20 | ||||
-rw-r--r-- | lib/Target/ELFTargetAsmInfo.cpp | 26 | ||||
-rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 14 | ||||
-rw-r--r-- | lib/Target/X86/X86TargetAsmInfo.cpp | 2 |
6 files changed, 41 insertions, 42 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index d82710fb10..5da01a2250 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -315,14 +315,14 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) { case 1: Kind = SectionKind::get(SectionKind::ReadOnlyWithRelLocal); break; case 0: switch (TM.getTargetData()->getTypeAllocSize(CPE.getType())) { - case 4: Kind = SectionKind::get(SectionKind::MergableConst4); break; - case 8: Kind = SectionKind::get(SectionKind::MergableConst8); break; - case 16: Kind = SectionKind::get(SectionKind::MergableConst16); break; - default: Kind = SectionKind::get(SectionKind::MergableConst); break; + case 4: Kind = SectionKind::get(SectionKind::MergeableConst4); break; + case 8: Kind = SectionKind::get(SectionKind::MergeableConst8); break; + case 16: Kind = SectionKind::get(SectionKind::MergeableConst16); break; + default: Kind = SectionKind::get(SectionKind::MergeableConst); break; } } - const Section *S = TAI->getSectionForMergableConstant(Kind); + const Section *S = TAI->getSectionForMergeableConstant(Kind); // The number of sections are small, just do a linear search from the // last section to the first. diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp index f34f86b4f4..97b7ff0c8d 100644 --- a/lib/CodeGen/ELFWriter.cpp +++ b/lib/CodeGen/ELFWriter.cpp @@ -161,15 +161,14 @@ ELFSection &ELFWriter::getConstantPoolSection(MachineConstantPoolEntry &CPE) { case 1: Kind = SectionKind::get(SectionKind::ReadOnlyWithRelLocal); break; case 0: switch (TM.getTargetData()->getTypeAllocSize(CPE.getType())) { - case 4: Kind = SectionKind::get(SectionKind::MergableConst4); break; - case 8: Kind = SectionKind::get(SectionKind::MergableConst8); break; - case 16: Kind = SectionKind::get(SectionKind::MergableConst16); break; - default: Kind = SectionKind::get(SectionKind::MergableConst); break; + case 4: Kind = SectionKind::get(SectionKind::MergeableConst4); break; + case 8: Kind = SectionKind::get(SectionKind::MergeableConst8); break; + case 16: Kind = SectionKind::get(SectionKind::MergeableConst16); break; + default: Kind = SectionKind::get(SectionKind::MergeableConst); break; } } - std::string CstPoolName = TAI->getSectionForMergableConstant(Kind)->getName(); - return getSection(CstPoolName, + return getSection(TAI->getSectionForMergeableConstant(Kind)->getName(), ELFSection::SHT_PROGBITS, ELFSection::SHF_MERGE | ELFSection::SHF_ALLOC, CPE.getAlignment()); diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp index 778aa22e88..503df19a3f 100644 --- a/lib/Target/DarwinTargetAsmInfo.cpp +++ b/lib/Target/DarwinTargetAsmInfo.cpp @@ -144,21 +144,21 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV, } // FIXME: Alignment check should be handled by section classifier. - if (Kind.isMergableCString()) + if (Kind.isMergeableCString()) return MergeableStringSection(cast<GlobalVariable>(GV)); - if (Kind.isMergableConst()) { - if (Kind.isMergableConst4()) + if (Kind.isMergeableConst()) { + if (Kind.isMergeableConst4()) return FourByteConstantSection; - if (Kind.isMergableConst8()) + if (Kind.isMergeableConst8()) return EightByteConstantSection; - if (Kind.isMergableConst16() && SixteenByteConstantSection) + if (Kind.isMergeableConst16() && SixteenByteConstantSection) return SixteenByteConstantSection; return ReadOnlySection; // .const } // FIXME: ROData -> const in -static mode that is relocatable but they happen - // by the static linker. Why not mergable? + // by the static linker. Why not mergeable? if (Kind.isReadOnly()) return getReadOnlySection(); @@ -188,17 +188,17 @@ DarwinTargetAsmInfo::MergeableStringSection(const GlobalVariable *GV) const { } const Section * -DarwinTargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const { +DarwinTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const { // If this constant requires a relocation, we have to put it in the data // segment, not in the text segment. if (Kind.isDataRel()) return ConstDataSection; - if (Kind.isMergableConst4()) + if (Kind.isMergeableConst4()) return FourByteConstantSection; - if (Kind.isMergableConst8()) + if (Kind.isMergeableConst8()) return EightByteConstantSection; - if (Kind.isMergableConst16() && SixteenByteConstantSection) + if (Kind.isMergeableConst16() && SixteenByteConstantSection) return SixteenByteConstantSection; return ReadOnlySection; // .const } diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 5d8d720cda..258542c31e 100644 --- a/lib/Target/ELFTargetAsmInfo.cpp +++ b/lib/Target/ELFTargetAsmInfo.cpp @@ -44,11 +44,11 @@ ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM) DataRelROLocalSection = getNamedSection("\t.data.rel.ro.local", SectionFlags::Writable); - MergableConst4Section = getNamedSection(".rodata.cst4", + MergeableConst4Section = getNamedSection(".rodata.cst4", SectionFlags::setEntitySize(SectionFlags::Mergeable, 4)); - MergableConst8Section = getNamedSection(".rodata.cst8", + MergeableConst8Section = getNamedSection(".rodata.cst8", SectionFlags::setEntitySize(SectionFlags::Mergeable, 8)); - MergableConst16Section = getNamedSection(".rodata.cst16", + MergeableConst16Section = getNamedSection(".rodata.cst16", SectionFlags::setEntitySize(SectionFlags::Mergeable, 16)); } @@ -57,16 +57,16 @@ const Section* ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind) const { if (Kind.isText()) return TextSection; - if (Kind.isMergableCString()) + if (Kind.isMergeableCString()) return MergeableStringSection(cast<GlobalVariable>(GV)); - if (Kind.isMergableConst()) { - if (Kind.isMergableConst4()) - return MergableConst4Section; - if (Kind.isMergableConst8()) - return MergableConst8Section; - if (Kind.isMergableConst16()) - return MergableConst16Section; + if (Kind.isMergeableConst()) { + if (Kind.isMergeableConst4()) + return MergeableConst4Section; + if (Kind.isMergeableConst8()) + return MergeableConst8Section; + if (Kind.isMergeableConst16()) + return MergeableConst16Section; return ReadOnlySection; // .const } @@ -88,11 +88,11 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV, return DataRelROSection; } -/// getSectionForMergableConstant - Given a mergable constant with the +/// getSectionForMergeableConstant - Given a Mergeable constant with the /// specified size and relocation information, return a section that it /// should be placed in. const Section * -ELFTargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const { +ELFTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const { return SelectSectionForGlobal(0, Kind); } diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index c8471021f4..205a34d97a 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -211,7 +211,7 @@ static unsigned SectionFlagsForGlobal(const GlobalValue *GV, Flags |= SectionFlags::TLS; if (Kind.isText()) Flags |= SectionFlags::Code; - if (Kind.isWritable()) + if (Kind.isWriteable()) Flags |= SectionFlags::Writable; return Flags; @@ -252,16 +252,16 @@ static SectionKind SectionKindForGlobal(const GlobalValue *GV, // If initializer is a null-terminated string, put it in a "cstring" // section if the target has it. if (isConstantString(C)) - return SectionKind::get(SectionKind::MergableCString); + return SectionKind::get(SectionKind::MergeableCString); // Otherwise, just drop it into a mergable constant section. If we have // a section for this size, use it, otherwise use the arbitrary sized // mergable section. switch (TM.getTargetData()->getTypeAllocSize(C->getType())) { - case 4: return SectionKind::get(SectionKind::MergableConst4); - case 8: return SectionKind::get(SectionKind::MergableConst8); - case 16: return SectionKind::get(SectionKind::MergableConst16); - default: return SectionKind::get(SectionKind::MergableConst); + case 4: return SectionKind::get(SectionKind::MergeableConst4); + case 8: return SectionKind::get(SectionKind::MergeableConst8); + case 16: return SectionKind::get(SectionKind::MergeableConst16); + default: return SectionKind::get(SectionKind::MergeableConst); } case Constant::LocalRelocation: @@ -377,7 +377,7 @@ TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV, /// specified size and relocation information, return a section that it /// should be placed in. const Section * -TargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const { +TargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const { if (Kind.isReadOnly()) if (const Section *S = getReadOnlySection()) return S; diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 9e7973aaa0..5de9d69614 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -269,7 +269,7 @@ const char *X86COFFTargetAsmInfo:: getSectionPrefixForUniqueGlobal(SectionKind Kind) const { if (Kind.isText()) return ".text$linkonce"; - if (Kind.isWritable()) + if (Kind.isWriteable()) return ".data$linkonce"; return ".rdata$linkonce"; } |