[PATCH] D30277: [COFF] added test for thinlto

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 15:15:01 PST 2017


mehdi_amini added a comment.

Maybe the testing is obvious to someone use to COFF, in which case I'm just out-of-place :) 
Otherwise I'd rather have comment explaining what every check is doing.



================
Comment at: test/COFF/thinlto.ll:9
+; RUN: llc -filetype=obj -o %T/thinlto/foo.obj %S/Inputs/lto-dep.ll
+; RUN: llvm-ar cru %T/thinlto/foo.lib %T/thinlto/foo.obj
+
----------------
is `.obj` the standard extension for object on Windows? (and `.lib` for archive?)


================
Comment at: test/COFF/thinlto.ll:11
+
+; RUN: lld-link /out:%T/thinlto/main.exe /entry:main /include:f2 /subsystem:console %T/thinlto/main.thinlto.obj %T/thinlto/foo.thinlto.obj
+; RUN: llvm-readobj -file-headers %T/thinlto/main.exe | FileCheck -check-prefix=HEADERS-11 %s
----------------
I don't know what is the `/include` directive doing? Is it preventing dead-stripping somehow? Or affecting the symbol resolution otherwise?


================
Comment at: test/COFF/thinlto.ll:34
+
+; HEADERS-11: AddressOfEntryPoint: 0x1000
+; TEXT-11: Disassembly of section .text:
----------------
I don't know enough about COFF to know if what you're testing is relevant here. Especially I have no idea why you're checking the HEADERS (or what you're checking).



================
Comment at: test/COFF/thinlto.ll:106
+; TEXT-10-NEXT: addq	$40, %rsp
+; TEXT-10-NEXT: retq
+
----------------
Why do we check this exact sequence of assembly? Overall I don't know what this test is enforcing / verifying right now.



https://reviews.llvm.org/D30277





More information about the llvm-commits mailing list