diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-27 06:17:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-27 06:17:14 +0000 |
commit | 86b7255776646e6a185ccf1dca5a07ec14ca0dd2 (patch) | |
tree | 90030a1fbb07ace6e8aecf78d03d44d0641b82f4 /llvm/lib/Target/DarwinTargetAsmInfo.cpp | |
parent | b7130ed888483494474650f5f6b8e9f547baa5c8 (diff) | |
download | bcm5719-llvm-86b7255776646e6a185ccf1dca5a07ec14ca0dd2.tar.gz bcm5719-llvm-86b7255776646e6a185ccf1dca5a07ec14ca0dd2.zip |
Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
instead.
llvm-svn: 77186
Diffstat (limited to 'llvm/lib/Target/DarwinTargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/DarwinTargetAsmInfo.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/llvm/lib/Target/DarwinTargetAsmInfo.cpp b/llvm/lib/Target/DarwinTargetAsmInfo.cpp index b3bcf4b3a19..4ac9eae94bc 100644 --- a/llvm/lib/Target/DarwinTargetAsmInfo.cpp +++ b/llvm/lib/Target/DarwinTargetAsmInfo.cpp @@ -28,30 +28,30 @@ using namespace llvm; DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) : TargetAsmInfo(TM) { - CStringSection_ = getUnnamedSection("\t.cstring", - SectionKind::MergeableCString); - FourByteConstantSection = getUnnamedSection("\t.literal4\n", - SectionKind::MergeableConst4); - EightByteConstantSection = getUnnamedSection("\t.literal8\n", - SectionKind::MergeableConst8); + CStringSection_ = getOrCreateSection("\t.cstring", true, + SectionKind::MergeableCString); + FourByteConstantSection = getOrCreateSection("\t.literal4\n", true, + SectionKind::MergeableConst4); + EightByteConstantSection = getOrCreateSection("\t.literal8\n", true, + SectionKind::MergeableConst8); // Note: 16-byte constant section is subtarget specific and should be provided // there, if needed. SixteenByteConstantSection = 0; - ReadOnlySection = getUnnamedSection("\t.const", SectionKind::ReadOnly); + ReadOnlySection = getOrCreateSection("\t.const", true, SectionKind::ReadOnly); TextCoalSection = - getNamedSection("\t__TEXT,__textcoal_nt,coalesced,pure_instructions", - SectionKind::Text); - ConstTextCoalSection = getNamedSection("\t__TEXT,__const_coal,coalesced", - SectionKind::Text); - ConstDataCoalSection = getNamedSection("\t__DATA,__const_coal,coalesced", - SectionKind::Text); - ConstDataSection = getUnnamedSection("\t.const_data", - SectionKind::ReadOnlyWithRel); - DataCoalSection = getNamedSection("\t__DATA,__datacoal_nt,coalesced", - SectionKind::DataRel); + getOrCreateSection("\t__TEXT,__textcoal_nt,coalesced,pure_instructions", + false, SectionKind::Text); + ConstTextCoalSection = getOrCreateSection("\t__TEXT,__const_coal,coalesced", + false, SectionKind::Text); + ConstDataCoalSection = getOrCreateSection("\t__DATA,__const_coal,coalesced", + false, SectionKind::Text); + ConstDataSection = getOrCreateSection("\t.const_data", true, + SectionKind::ReadOnlyWithRel); + DataCoalSection = getOrCreateSection("\t__DATA,__datacoal_nt,coalesced", + false, SectionKind::DataRel); // Common settings for all Darwin targets. |