diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-08-07 09:55:06 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-08-07 09:55:06 +0000 |
commit | 9dbbd7506869a0dd0516b1d6e83a6696fa8f83c1 (patch) | |
tree | b44ead19dbcb147d0193fc53d180439c4ad01c35 /llvm/lib/Target/ELFTargetAsmInfo.cpp | |
parent | 1c2de108619628dd57c00cc753d604a27fc2eea0 (diff) | |
download | bcm5719-llvm-9dbbd7506869a0dd0516b1d6e83a6696fa8f83c1.tar.gz bcm5719-llvm-9dbbd7506869a0dd0516b1d6e83a6696fa8f83c1.zip |
Print section flags ok on platforms, which use '@' as comment string. Fix test.
llvm-svn: 54460
Diffstat (limited to 'llvm/lib/Target/ELFTargetAsmInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ELFTargetAsmInfo.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/lib/Target/ELFTargetAsmInfo.cpp b/llvm/lib/Target/ELFTargetAsmInfo.cpp index 19e5b011945..82ac847e845 100644 --- a/llvm/lib/Target/ELFTargetAsmInfo.cpp +++ b/llvm/lib/Target/ELFTargetAsmInfo.cpp @@ -166,13 +166,19 @@ std::string ELFTargetAsmInfo::PrintSectionFlags(unsigned flags) const { if (flags & SectionFlags::Small) Flags += 's'; - Flags += "\""; + Flags += "\","; + + // If comment string is '@', e.g. as on ARM - use '%' instead + if (strcmp(CommentString, "@") == 0) + Flags += '%'; + else + Flags += '@'; // FIXME: There can be exceptions here if (flags & SectionFlags::BSS) - Flags += ",@nobits"; + Flags += "nobits"; else - Flags += ",@progbits"; + Flags += "progbits"; if (unsigned entitySize = SectionFlags::getEntitySize(flags)) Flags += "," + utostr(entitySize); |