diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-10-08 19:37:38 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-10-08 19:37:38 +0000 |
commit | ff9dfedd101e1a591ec8f7fac9999777cde80efb (patch) | |
tree | ec6cb26417b99a1eea93575a4471249301b492d1 | |
parent | c2921ea840a0c87f6c4f065bc775a9060e2aa626 (diff) |
Call InitSections in llc and clang so that the binaries produced by them
are easier to diff with those produced by llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116095 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 1 | ||||
-rw-r--r-- | test/MC/ELF/entsize.ll | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 36038027b2..cf46738e2c 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -160,6 +160,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, AsmStreamer.reset(getTarget().createObjectStreamer(TargetTriple, *Context, *TAB, Out, MCE, hasMCRelaxAll())); + AsmStreamer.get()->InitSections(); break; } case CGFT_Null: diff --git a/test/MC/ELF/entsize.ll b/test/MC/ELF/entsize.ll index f8290d122d..bb289d359d 100644 --- a/test/MC/ELF/entsize.ll +++ b/test/MC/ELF/entsize.ll @@ -20,7 +20,7 @@ declare void @foo(i64* nocapture) nounwind ;;;;; -; 64: (('sh_name', 7) # '.rodata.str1.1' +; 64: (('sh_name', 18) # '.rodata.str1.1' ; 64-NEXT: ('sh_type', 1) ; 64-NEXT: ('sh_flags', 50) ; 64-NEXT: ('sh_addr', @@ -31,7 +31,7 @@ declare void @foo(i64* nocapture) nounwind ; 64-NEXT: ('sh_addralign', 1) ; 64-NEXT: ('sh_entsize', 1) -; 64: (('sh_name', 22) # '.rodata.cst8' +; 64: (('sh_name', 33) # '.rodata.cst8' ; 64-NEXT: ('sh_type', 1) ; 64-NEXT: ('sh_flags', 18) ; 64-NEXT: ('sh_addr', |