aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-26 07:33:58 +0000
committerChris Lattner <sabre@nondot.org>2009-07-26 07:33:58 +0000
commitf40761d5229322c08701049f89aa10f7f7b8b743 (patch)
treef2e518e73ea7336cbd533cec5f9f97d7ef6ae666 /lib/CodeGen
parent6468b44d3a300007077ff0d8c70b8cf15ae618e8 (diff)
remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,
just use a smallstring instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 0bbbddf54c..c608f6e444 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -135,12 +135,16 @@ void AsmPrinter::SwitchToSection(const Section* NS) {
// 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.
- if (NS->hasFlag(SectionFlags::Named))
+ if (NS->hasFlag(SectionFlags::Named)) {
O << TAI->getSwitchToSectionDirective()
- << CurrentSection
- << TAI->getSectionFlags(NS->getFlags());
- else
+ << CurrentSection;
+
+ SmallString<32> FlagsStr;
+ TAI->getSectionFlags(NS->getFlags(), FlagsStr);
+ O << FlagsStr.c_str();
+ } else {
O << CurrentSection;
+ }
O << TAI->getDataSectionStartSuffix() << '\n';
}