Skip to content

Commit af8b487

Browse files
committed
Call InitSections in llc and clang so that the binaries produced by them
are easier to diff with those produced by llvm-mc. llvm-svn: 116095
1 parent 366c146 commit af8b487

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/CodeGen/LLVMTargetMachine.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
160160
AsmStreamer.reset(getTarget().createObjectStreamer(TargetTriple, *Context,
161161
*TAB, Out, MCE,
162162
hasMCRelaxAll()));
163+
AsmStreamer.get()->InitSections();
163164
break;
164165
}
165166
case CGFT_Null:

llvm/test/MC/ELF/entsize.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare void @foo(i64* nocapture) nounwind
2020

2121
;;;;;
2222

23-
; 64: (('sh_name', 7) # '.rodata.str1.1'
23+
; 64: (('sh_name', 18) # '.rodata.str1.1'
2424
; 64-NEXT: ('sh_type', 1)
2525
; 64-NEXT: ('sh_flags', 50)
2626
; 64-NEXT: ('sh_addr',
@@ -31,7 +31,7 @@ declare void @foo(i64* nocapture) nounwind
3131
; 64-NEXT: ('sh_addralign', 1)
3232
; 64-NEXT: ('sh_entsize', 1)
3333

34-
; 64: (('sh_name', 22) # '.rodata.cst8'
34+
; 64: (('sh_name', 33) # '.rodata.cst8'
3535
; 64-NEXT: ('sh_type', 1)
3636
; 64-NEXT: ('sh_flags', 18)
3737
; 64-NEXT: ('sh_addr',

0 commit comments

Comments
 (0)