[PATCH] D68213: [LTO] Support for embedding bitcode section during LTO

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 11 09:54:55 PST 2019


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM with a few small suggestions before you commit.



================
Comment at: llvm/lib/LTO/LTOBackend.cpp:317
+static cl::opt<bool> EmbedBitcode("lto-embed-bitcode", cl::init(false),
+                                  cl::desc("Embed LLVM bitcode"));
+
----------------
Expand description a bit to indicate that it will embed LLVM bitcode in object files produced by LTO.


================
Comment at: llvm/test/LTO/X86/embed-bitcode.ll:8
+
+; RUN: llvm-lto2 run -r %t1.o,_start,px -r %t2.o,foo,px -r %t3.o,bar,px -r %t2.o,bar,px -lto-embed-bitcode=0 -o %t3 %t1.o %t2.o %t3.o
+; RUN: llvm-readelf -S %t3.0 | FileCheck %s --implicit-check-not=.llvmbc
----------------
I don't think it is necessary to check anything other than "-lto-embed-bitcode=false" and "-lto-embed-bitcode", and the default. Otherwise you are just testing the standard behavior of cl::opt, and that isn't necessary for a new internal option.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68213/new/

https://reviews.llvm.org/D68213





More information about the cfe-commits mailing list