diff options
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetAsmInfo.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp index 5de9d696147..b584cb49c3c 100644 --- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp @@ -274,17 +274,18 @@ getSectionPrefixForUniqueGlobal(SectionKind Kind) const { return ".rdata$linkonce"; } -std::string X86COFFTargetAsmInfo::printSectionFlags(unsigned flags) const { - std::string Flags = ",\""; - if (flags & SectionFlags::Code) - Flags += 'x'; - if (flags & SectionFlags::Writable) - Flags += 'w'; - - Flags += "\""; - - return Flags; +void X86COFFTargetAsmInfo::getSectionFlags(unsigned Flags, + SmallVectorImpl<char> &Str) const { + // FIXME: Inefficient. + std::string Res = ",\""; + if (Flags & SectionFlags::Code) + Res += 'x'; + if (Flags & SectionFlags::Writable) + Res += 'w'; + Res += "\""; + + Str.append(Res.begin(), Res.end()); } X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM): |