[all-commits] [llvm/llvm-project] 13aee9: [ThinLTO] Fix empty .llvmcmd sections

Mircea Trofin via All-commits all-commits at lists.llvm.org
Thu Oct 29 09:58:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 13aee94bc710bfa6277c1f07146c714ee65bf2de
      https://github.com/llvm/llvm-project/commit/13aee94bc710bfa6277c1f07146c714ee65bf2de
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2020-10-29 (Thu, 29 Oct 2020)

  Changed paths:
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/CodeGen/thinlto_embed_bitcode.ll

  Log Message:
  -----------
  [ThinLTO] Fix empty .llvmcmd sections

When passing -lto-embed-bitcode=post-merge-pre-opt, we were getting
empty .llvmcmd sections. It turns out that is because the
CodeGenOptions::CmdArgs field was only populated when clang saw
-fembed-bitcode={all|marker}.

This patch always populates the CodeGenOptions::CmdArgs. The overhead
of carrying through in memory in all cases is likely negligible in
the grand schema of things, and it keeps the using code simple.

Differential Revision: https://reviews.llvm.org/D90366




More information about the All-commits mailing list