Skip to content

Commit f859b78

Browse files
committed
Remove initSections()
Also updates the test to match ideas, to make it easier to move those blocks around.
1 parent 469206d commit f859b78

File tree

3 files changed

+22
-31
lines changed

3 files changed

+22
-31
lines changed

llvm/include/llvm/MC/MCGOFFStreamer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class MCGOFFStreamer : public MCObjectStreamer {
2626

2727
~MCGOFFStreamer() override;
2828

29-
void initSections(bool NoExecStack, const MCSubtargetInfo &STI) override;
3029
void changeSection(MCSection *Section, uint32_t Subsection = 0) override;
3130

3231
GOFFObjectWriter &getWriter();

llvm/lib/MC/MCGOFFStreamer.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() {
2727
return static_cast<GOFFObjectWriter &>(getAssembler().getWriter());
2828
}
2929

30-
void MCGOFFStreamer::initSections(bool /*NoExecStack*/,
31-
const MCSubtargetInfo &STI) {
32-
MCContext &Ctx = getContext();
33-
// Emit the text section.
34-
switchSection(Ctx.getObjectFileInfo()->getADASection());
35-
switchSection(Ctx.getObjectFileInfo()->getTextSection());
36-
}
37-
3830
namespace {
3931
// Make sure that all section are registered in the correct order.
4032
void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) {

llvm/test/MC/GOFF/section.ll

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,41 +33,41 @@ entry:
3333
; The 60 at offset 0x89 is the tasking behavior.
3434
; The 01 at offset 0x91 is the binding scope.
3535
; The name begins at offset 0x97, and is test#C.
36-
; CHECK: 0000050 03 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00
36+
; CHECK: 0000050 03 00 00 00 [[ROOTSD:00 00 00 01]] 00 00 00 00 00 00 00 00
3737
; CHECK: 0000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3838
; CHECK: 0000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3939
; CHECK: 0000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60
4040
; CHECK: 0000090 00 01 00 00 00 00 00 06 a3 85 a2 a3 7b c3 00 00
4141

42+
; ESD record, type ED.
43+
; The name is C_CODE64.
44+
; The regular expression matches the low byte of the length.
45+
; CHECK: 00000a0 03 00 00 01 [[C_CODE64:00 00 00 02]] [[ROOTSD]] 00 00 00 00
46+
; CHECK: 00000b0 00 00 00 00 00 00 00 00 00 00 00 {{..}} 00 00 00 00
47+
; CHECK: 00000c0 00 00 00 00 00 00 00 00 01 80 00 00 00 00 00 00
48+
; CHECK: 00000d0 00 00 00 00 00 00 00 00 00 00 00 00 04 04 00 0a
49+
; CHECK: 00000e0 00 00 03 00 00 00 00 08 c3 6d c3 d6 c4 c5 f6 f4
50+
4251
; ESD record, type ED.
4352
; The name is C_WSA64.
44-
; CHECK: 00000a0 03 00 00 01 00 00 00 02 00 00 00 01 00 00 00 00
45-
; CHECK: 00000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
46-
; CHECK: 00000c0 00 00 00 00 00 00 00 00 03 81 00 00 00 00 00 00
47-
; CHECK: 00000d0 00 00 00 00 00 00 00 00 00 00 00 00 04 04 01 01
48-
; CHECK: 00000e0 00 40 04 00 00 00 00 07 c3 6d e6 e2 c1 f6 f4 00
53+
; CHECK: 00001e0 03 00 00 01 [[C_WSA64:00 00 00 05]] [[ROOTSD]] 00 00 00 00
54+
; CHECK: 00001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
55+
; CHECK: 0000200 00 00 00 00 00 00 00 00 03 81 00 00 00 00 00 00
56+
; CHECK: 0000210 00 00 00 00 00 00 00 00 00 00 00 00 04 04 01 01
57+
; CHECK: 0000220 00 40 04 00 00 00 00 07 c3 6d e6 e2 c1 f6 f4 00
4958

5059
; ESD record, type PR.
5160
; The name is test#S.
52-
; CHECK: 00000f0 03 00 00 03 00 00 00 03 00 00 00 02 00 00 00 00
53-
; CHECK: 0000100 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00
54-
; CHECK: 0000110 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00
55-
; CHECK: 0000120 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 01
56-
; CHECK: 0000130 00 01 24 00 00 00 00 06 a3 85 a2 a3 7b e2 00 00
57-
58-
; ESD record, type ED.
59-
; The name is C_CODE64.
60-
; The regular expression matches the low byte of the length.
61-
; CHECK: 0000140 03 00 00 01 00 00 00 04 00 00 00 01 00 00 00 00
62-
; CHECK: 0000150 00 00 00 00 00 00 00 00 00 00 00 {{..}} 00 00 00 00
63-
; CHECK: 0000160 00 00 00 00 00 00 00 00 01 80 00 00 00 00 00 00
64-
; CHECK: 0000170 00 00 00 00 00 00 00 00 00 00 00 00 04 04 00 0a
65-
; CHECK: 0000180 00 00 03 00 00 00 00 08 c3 6d c3 d6 c4 c5 f6 f4
61+
; CHECK: 0000230 03 00 00 03 [[TESTS:00 00 00 06]] [[C_WSA64]] 00 00 00 00
62+
; CHECK: 0000240 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 00
63+
; CHECK: 0000250 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00
64+
; CHECK: 0000260 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 01
65+
; CHECK: 0000270 00 01 24 00 00 00 00 06 a3 85 a2 a3 7b e2 00 00
6666

6767
; ESD record, type LD.
6868
; The name is test#C.
69-
; CHECK: 00002d0 03 00 00 02 00 00 00 08 00 00 00 04 00 00 00 00
69+
; CHECK: 00002d0 03 00 00 02 [[TESTC:00 00 00 08]] [[C_CODE64]] 00 00 00 00
7070
; CHECK: 00002e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
71-
; CHECK: 00002f0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 03
71+
; CHECK: 00002f0 00 00 00 00 00 00 00 00 01 00 00 00 [[TESTS]]
7272
; CHECK: 0000300 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 02
7373
; CHECK: 0000310 00 01 20 00 00 00 00 06 a3 85 a2 a3 7b c3 00 00

0 commit comments

Comments
 (0)