summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetAsmInfo.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-09-24 22:14:23 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-09-24 22:14:23 +0000
commit076e905b9480a75a33f5bbf56f26ecd2d8e88dc2 (patch)
tree991f647055f68842b64d4a63b5d0ba97242e7e57 /llvm/lib/Target/TargetAsmInfo.cpp
parent69ff51baa0e051aee3a2a554b31aad8f15be3d74 (diff)
downloadbcm5719-llvm-076e905b9480a75a33f5bbf56f26ecd2d8e88dc2.tar.gz
bcm5719-llvm-076e905b9480a75a33f5bbf56f26ecd2d8e88dc2.zip
Move actual section printing stuff to AsmPrinter from TAI reducing heap traffic.
llvm-svn: 56573
Diffstat (limited to 'llvm/lib/Target/TargetAsmInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetAsmInfo.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp
index 06b77dd26aa..536f16d6578 100644
--- a/llvm/lib/Target/TargetAsmInfo.cpp
+++ b/llvm/lib/Target/TargetAsmInfo.cpp
@@ -272,7 +272,7 @@ TargetAsmInfo::SectionFlagsForGlobal(const GlobalValue *GV,
return Flags;
}
-std::string
+const Section*
TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const {
const Section* S;
// Select section name
@@ -286,13 +286,7 @@ TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const {
S = SelectSectionForGlobal(GV);
}
- if (!S->isNamed())
- return S->Name;
-
- // If section is named we need to switch into it via special '.section'
- // directive and also append funky flags. Otherwise - section name is just
- // some magic assembler directive.
- return getSwitchToSectionDirective() + S->Name + getSectionFlags(S->Flags);
+ return S;
}
// Lame default implementation. Calculate the section name for global.
OpenPOWER on IntegriCloud