aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/TargetAsmInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/TargetAsmInfo.cpp')
-rw-r--r--lib/Target/TargetAsmInfo.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index 06b77dd..536f16d 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/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.