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 | feac94b18d8267c14ce4076741e7cf32196ed6d9 (patch) | |
tree | 2d2dad11c5b0b3c4a67d5d12aeb9f30411c14aa8 /lib/Target | |
parent | 1e27da3e6c19ebb6fb789edc0d678cf621f1a46e (diff) | |
download | external_llvm-feac94b18d8267c14ce4076741e7cf32196ed6d9.zip external_llvm-feac94b18d8267c14ce4076741e7cf32196ed6d9.tar.gz external_llvm-feac94b18d8267c14ce4076741e7cf32196ed6d9.tar.bz2 |
Print section flags ok on platforms, which use '@' as comment string. Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ELFTargetAsmInfo.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 19e5b01..82ac847 100644 --- a/lib/Target/ELFTargetAsmInfo.cpp +++ b/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); |