Index: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp =================================================================== --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -2378,13 +2378,9 @@ } if (Kind.isMergeableCString()) { - Align Alignment = GO->getParent()->getDataLayout().getPreferredAlign( - cast(GO)); - unsigned EntrySize = getEntrySizeForKind(Kind); - std::string SizeSpec = ".rodata.str" + utostr(EntrySize) + "."; - SmallString<128> Name; - Name = SizeSpec + utostr(Alignment.value()); + SmallString<128> Name(".rodata.str"); + Name += utostr(EntrySize); if (TM.getDataSections()) getNameWithPrefix(Name, GO, TM); Index: llvm/test/CodeGen/PowerPC/aix-return55.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-return55.ll +++ llvm/test/CodeGen/PowerPC/aix-return55.ll @@ -27,8 +27,8 @@ ;CHECKOBJ64: 0000000000000000 <.foo>: ;CHECKOBJ-NEXT: 0: 38 60 00 37 li 3, 55 ;CHECKOBJ-NEXT: 4: 4e 80 00 20 blr{{[[:space:]] *}} -;CHECKOBJ32-NEXT: 00000008 <.rodata.str1.1>: -;CHECKOBJ64-NEXT: 0000000000000008 <.rodata.str1.1>: +;CHECKOBJ32-NEXT: 00000008 <.rodata.str1>: +;CHECKOBJ64-NEXT: 0000000000000008 <.rodata.str1>: ;CHECKOBJ-NEXT: 8: 68 65 6c 6c xori 5, 3, 27756 ;CHECKOBJ-NEXT: c: 6f 77 6f 72 xoris 23, 27, 28530 ;CHECKOBJ-NEXT: 10: 0a 00 00 00 tdlti 0, 0{{[[:space:]] *}} Index: llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll @@ -70,16 +70,16 @@ ; CHECK-NEXT: .vbyte 4, 35 # 0x23 ; CHECK-NEXT: .comm a[RW],4,2 ; CHECK-NEXT: .comm f[RW],4,2 -; CHECK-NEXT: .csect .rodata.str1.1L...str[RO],2 +; CHECK-NEXT: .csect .rodata.str1L...str[RO],2 ; CHECK-NEXT: .string "abcdefgh" ; CHECK32: .csect p[RW],2 ; CHECK32-NEXT: .globl p[RW] ; CHECK32-NEXT: .align 2 -; CHECK32-NEXT: .vbyte 4, .rodata.str1.1L...str[RO] +; CHECK32-NEXT: .vbyte 4, .rodata.str1L...str[RO] ; CHECK64: .csect p[RW],3 ; CHECK64-NEXT: .globl p[RW] ; CHECK64-NEXT: .align 3 -; CHECK64-NEXT: .vbyte 8, .rodata.str1.1L...str[RO] +; CHECK64-NEXT: .vbyte 8, .rodata.str1L...str[RO] ; CHECK: .toc ; CHECK-NEXT: L..C0: ; CHECK-NEXT: .tc p[TC],p[RW] @@ -93,7 +93,7 @@ ; CHECKOBJ: 00000038 (idx: 7) const_ivar[RO]: ; CHECKOBJ-NEXT: 38: 00 00 00 23 ; CHECKOBJ-EMPTY: -; CHECKOBJ-NEXT: 0000003c (idx: 9) .rodata.str1.1L...str[RO]: +; CHECKOBJ-NEXT: 0000003c (idx: 9) .rodata.str1L...str[RO]: ; CHECKOBJ-NEXT: 3c: 61 62 63 64 ; CHECKOBJ-NEXT: 40: 65 66 67 68 ; CHECKOBJ-NEXT: 44: 00 00 00 00 @@ -156,7 +156,7 @@ ; CHECKSYM: } ; CHECKSYM: } ; CHECKSYM: Symbol { -; CHECKSYM: Name: .rodata.str1.1L...str +; CHECKSYM: Name: .rodata.str1L...str ; CHECKSYM: Value (RelocatableAddress): 0x3C ; CHECKSYM: Section: .text ; CHECKSYM: Type: 0x0 Index: llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll =================================================================== --- llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll +++ llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll @@ -26,35 +26,35 @@ ret i8 %1 } -; CHECK: .csect .rodata.str2.2[RO],2 +; CHECK: .csect .rodata.str2[RO],2 ; CHECK-NEXT: .align 1 ; CHECK-NEXT: L..magic16: ; CHECK-NEXT: .vbyte 2, 264 # 0x108 ; CHECK-NEXT: .vbyte 2, 272 # 0x110 ; CHECK-NEXT: .vbyte 2, 213 # 0xd5 ; CHECK-NEXT: .vbyte 2, 0 # 0x0 -; CHECK-NEXT: .csect .rodata.str4.4[RO],2 +; CHECK-NEXT: .csect .rodata.str4[RO],2 ; CHECK-NEXT: .align 2 ; CHECK-NEXT: L..magic32: ; CHECK-NEXT: .vbyte 4, 464 # 0x1d0 ; CHECK-NEXT: .vbyte 4, 472 # 0x1d8 ; CHECK-NEXT: .vbyte 4, 413 # 0x19d ; CHECK-NEXT: .vbyte 4, 0 # 0x0 -; CHECK-NEXT: .csect .rodata.str1.1[RO],2 +; CHECK-NEXT: .csect .rodata.str1[RO],2 ; CHECK-NEXT: L..strA: ; CHECK-NEXT: .byte 'h,'e,'l,'l,'o,' ,'w,'o,'r,'l,'d,'!,0012,0000 ; CHECK-NEXT: L...str: ; CHECK-NEXT: .string "abcdefgh" -; CHECKOBJ: 00000010 <.rodata.str2.2>: +; CHECKOBJ: 00000010 <.rodata.str2>: ; CHECKOBJ-NEXT: 10: 01 08 01 10 ; CHECKOBJ-NEXT: 14: 00 d5 00 00 {{.*}}{{[[:space:]] *}} -; CHECKOBJ-NEXT: 00000018 <.rodata.str4.4>: +; CHECKOBJ-NEXT: 00000018 <.rodata.str4>: ; CHECKOBJ-NEXT: 18: 00 00 01 d0 ; CHECKOBJ-NEXT: 1c: 00 00 01 d8 ; CHECKOBJ-NEXT: 20: 00 00 01 9d ; CHECKOBJ-NEXT: 24: 00 00 00 00 {{.*}}{{[[:space:]] *}} -; CHECKOBJ-NEXT: 00000028 <.rodata.str1.1>: +; CHECKOBJ-NEXT: 00000028 <.rodata.str1>: ; CHECKOBJ-NEXT: 28: 68 65 6c 6c ; CHECKOBJ-NEXT: 2c: 6f 20 77 6f ; CHECKOBJ-NEXT: 30: 72 6c 64 21 Index: llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test =================================================================== --- llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test +++ llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test @@ -71,7 +71,7 @@ ; SYM-NEXT: 00000000 l .text 00000091 .text ; SYM-NEXT: 00000000 g F .text (csect: .text) 00000000 .bar ; SYM-NEXT: 00000050 g F .text (csect: .text) 00000000 .foo -; SYM-NEXT: 00000094 l .text 00000013 .rodata.str1.1L...str +; SYM-NEXT: 00000094 l .text 00000013 .rodata.str1L...str ; SYM-NEXT: 000000a8 g O .data 00000004 con ; SYM-NEXT: 000000ac w O .data 00000004 wi ; SYM-NEXT: 000000b0 g O .data 00000004 i @@ -93,7 +93,7 @@ ; SYM-DES-NEXT: 00000000 l .text 00000091 (idx: 3) .text[PR] ; SYM-DES-NEXT: 00000000 g F .text (csect: (idx: 3) .text[PR]) 00000000 (idx: 5) .bar ; SYM-DES-NEXT: 00000050 g F .text (csect: (idx: 3) .text[PR]) 00000000 (idx: 7) .foo -; SYM-DES-NEXT: 00000094 l .text 00000013 (idx: 9) .rodata.str1.1L...str[RO] +; SYM-DES-NEXT: 00000094 l .text 00000013 (idx: 9) .rodata.str1L...str[RO] ; SYM-DES-NEXT: 000000a8 g O .data 00000004 (idx: 11) con[RW] ; SYM-DES-NEXT: 000000ac w O .data 00000004 (idx: 13) wi[RW] ; SYM-DES-NEXT: 000000b0 g O .data 00000004 (idx: 15) i[RW]