[NFC][ThinLTO] EmbedBitcodeSection doesn't need the Config
authorMircea Trofin <mtrofin@google.com>
Tue, 8 Sep 2020 23:42:16 +0000 (16:42 -0700)
committerMircea Trofin <mtrofin@google.com>
Wed, 9 Sep 2020 00:14:44 +0000 (17:14 -0700)
Instead, passing in the command line options, initialized to nullptr. In
an upcoming patch, we can then use the parameter to pass actual command
line options.

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

llvm/lib/LTO/LTOBackend.cpp

index ca29548..65d8669 100644 (file)
@@ -350,7 +350,7 @@ static cl::opt<bool> EmbedBitcode(
     "lto-embed-bitcode", cl::init(false),
     cl::desc("Embed LLVM bitcode in object files produced by LTO"));
 
-static void EmitBitcodeSection(Module &M, const Config &Conf) {
+static void EmitBitcodeSection(Module &M) {
   if (!EmbedBitcode)
     return;
   SmallVector<char, 0> Buffer;
@@ -369,7 +369,7 @@ void codegen(const Config &Conf, TargetMachine *TM, AddStreamFn AddStream,
   if (Conf.PreCodeGenModuleHook && !Conf.PreCodeGenModuleHook(Task, Mod))
     return;
 
-  EmitBitcodeSection(Mod, Conf);
+  EmitBitcodeSection(Mod);
 
   std::unique_ptr<ToolOutputFile> DwoOut;
   SmallString<1024> DwoFile(Conf.SplitDwarfOutput);