diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 647f570ab807e..55fb522554fad 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -2426,23 +2426,6 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal( Name, Kind, XCOFF::CsectProperties(SMC, XCOFF::XTY_CM)); } - 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()); - - if (TM.getDataSections()) - getNameWithPrefix(Name, GO, TM); - - return getContext().getXCOFFSection( - Name, Kind, XCOFF::CsectProperties(XCOFF::XMC_RO, XCOFF::XTY_SD), - /* MultiSymbolsAllowed*/ !TM.getDataSections()); - } - if (Kind.isText()) { if (TM.getFunctionSections()) { return cast(getFunctionEntryPointSymbol(GO, TM)) diff --git a/llvm/test/CodeGen/PowerPC/aix-return55.ll b/llvm/test/CodeGen/PowerPC/aix-return55.ll index 384480375a2be..c7d481ced140e 100644 --- a/llvm/test/CodeGen/PowerPC/aix-return55.ll +++ b/llvm/test/CodeGen/PowerPC/aix-return55.ll @@ -27,8 +27,8 @@ entry: ;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>: +;CHECKOBJ64-NEXT: 0000000000000008 <.rodata>: ;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:]] *}} diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll index 37445c7d5240c..9072e98aecb24 100644 --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data-sections.ll @@ -70,16 +70,16 @@ entry: ; 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 L...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, L...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, L...str[RO] ; CHECK: .toc ; CHECK-NEXT: L..C0: ; CHECK-NEXT: .tc p[TC],p[RW] @@ -93,7 +93,7 @@ entry: ; 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) L...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 @@ entry: ; CHECKSYM: } ; CHECKSYM: } ; CHECKSYM: Symbol { -; CHECKSYM: Name: .rodata.str1.1L...str +; CHECKSYM: Name: L...str ; CHECKSYM: Value (RelocatableAddress): 0x3C ; CHECKSYM: Section: .text ; CHECKSYM: Type: 0x0 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll index 15402b5a5f18a..7a5be471e8974 100644 --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll @@ -26,35 +26,31 @@ entry: ret i8 %1 } -; CHECK: .csect .rodata.str2.2[RO],2 +; CHECK: .csect .rodata[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: .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: 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>: ; CHECKOBJ-NEXT: 10: 01 08 01 10 -; CHECKOBJ-NEXT: 14: 00 d5 00 00 {{.*}}{{[[:space:]] *}} -; CHECKOBJ-NEXT: 00000018 <.rodata.str4.4>: +; CHECKOBJ-NEXT: 14: 00 d5 00 00 ; 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: 24: 00 00 00 00 ; CHECKOBJ-NEXT: 28: 68 65 6c 6c ; CHECKOBJ-NEXT: 2c: 6f 20 77 6f ; CHECKOBJ-NEXT: 30: 72 6c 64 21 diff --git a/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test b/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test index 815a3a5ccea1d..f8fc114f05a62 100644 --- a/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test +++ b/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test @@ -71,7 +71,7 @@ entry: ; SYM-NEXT: 00000000 l .text 00000091 ; SYM-NEXT: 00000000 g F .text (csect: ) 00000000 .bar ; SYM-NEXT: 00000050 g F .text (csect: ) 00000000 .foo -; SYM-NEXT: 00000094 l .text 00000013 .rodata.str1.1L...str +; SYM-NEXT: 00000094 l .text 00000013 L...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 @@ entry: ; SYM-DES-NEXT: 00000000 l .text 00000091 (idx: 3) [PR] ; SYM-DES-NEXT: 00000000 g F .text (csect: (idx: 3) [PR]) 00000000 (idx: 5) .bar ; SYM-DES-NEXT: 00000050 g F .text (csect: (idx: 3) [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) L...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]