Reduce heap trashing due to std::string construction / concatenation via caching of section flags string representations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2008-08-16 12:57:07 +00:00
parent 7c856c09cd
commit d0c1e29aec
8 changed files with 35 additions and 9 deletions

View File

@ -27,9 +27,9 @@ SparcELFTargetAsmInfo::SparcELFTargetAsmInfo(const TargetMachine &TM):
CStringSection=".rodata.str";
}
std::string SparcELFTargetAsmInfo::PrintSectionFlags(unsigned flags) const {
std::string SparcELFTargetAsmInfo::printSectionFlags(unsigned flags) const {
if (flags & SectionFlags::Mergeable)
return ELFTargetAsmInfo::PrintSectionFlags(flags);
return ELFTargetAsmInfo::printSectionFlags(flags);
std::string Flags;
if (!(flags & SectionFlags::Debug))