1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Print section flags ok on platforms, which use '@' as comment string. Fix test.

llvm-svn: 54460
This commit is contained in:
Anton Korobeynikov 2008-08-07 09:55:06 +00:00
parent 5fa19dc20a
commit 52d0ff92cc
2 changed files with 10 additions and 4 deletions

View File

@ -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);

View File

@ -1,7 +1,7 @@
; RUN: llvm-as < %s | llc -mtriple=arm-linux | \
; RUN: grep {__DTOR_END__:}
; RUN: llvm-as < %s | llc -mtriple=arm-linux | \
; RUN: grep {.section .dtors,"aw",.progbits}
; RUN: grep {\\.section.\\.dtors,"aw",.progbits}
@__DTOR_END__ = internal global [1 x i32] zeroinitializer, section ".dtors" ; <[1 x i32]*> [#uses=0]