[PATCH] LTO: introduce object file-based on-disk module format.

Peter Collingbourne peter at pcc.me.uk
Thu Sep 18 14:38:43 PDT 2014


================
Comment at: test/tools/gold/bcsection.ll:5
@@ +4,3 @@
+; RUN: ld -r -o %T/bcsection.o -plugin %llvmshlibdir/LLVMgold.so %T/bcsection.bco
+; RUN: llvm-nm -no-llvm-bc %T/bcsection.o | FileCheck %s
+
----------------
rafael wrote:
> Since the intention is to check that %T/bcsection.o is not just a copy of %T/bcsection.bco, how about extending this to:
> 
> llvm-nm -no-llvm-bc %T/bcsection.bco | FileCheck %s --check-prefix=NO-MAIN
> lvm-nm  %T/bcsection.bco | FileCheck %s
> lvm-nm  %T/bcsection.o| FileCheck %s
> 
> ?
The first test seems useful (as a negative test for -no-llvm-bc); added.

The LTO test suite already has variations of the second test.

I don't see what the third one would accomplish. More specifically, I don't see how it could fail if "llvm-nm -no-llvm-bc %T/bcsection.o | FileCheck %s" passes. Maybe if the object file had an .llvmbc section whose bitcode does not define 'main'? But this seems unlikely.

http://reviews.llvm.org/D4371






More information about the llvm-commits mailing list