diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:33:58 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 07:33:58 +0000 | 
| commit | 1db210322aee38cd93a5489996e251072461f1ff (patch) | |
| tree | f20488bc741c9d5b0fa0a560b7c15d114d5f9c68 /llvm/lib/CodeGen/AsmPrinter | |
| parent | d2e0220cb411126637d0f9ff3262a33201d37385 (diff) | |
| download | bcm5719-llvm-1db210322aee38cd93a5489996e251072461f1ff.tar.gz bcm5719-llvm-1db210322aee38cd93a5489996e251072461f1ff.zip | |
remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,
just use a smallstring instead.
llvm-svn: 77144
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 0bbbddf54c7..c608f6e4447 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/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';    } | 

