[llvm] 4013bab - [NFC][ThinLTO] EmbedBitcodeSection doesn't need the Config

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 17:14:54 PDT 2020


Author: Mircea Trofin
Date: 2020-09-08T17:14:44-07:00
New Revision: 4013bab9c4a5fe634be6271779a99bc158c3e396

URL: https://github.com/llvm/llvm-project/commit/4013bab9c4a5fe634be6271779a99bc158c3e396
DIFF: https://github.com/llvm/llvm-project/commit/4013bab9c4a5fe634be6271779a99bc158c3e396.diff

LOG: [NFC][ThinLTO] EmbedBitcodeSection doesn't need the Config

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

Added: 
    

Modified: 
    llvm/lib/LTO/LTOBackend.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index ca29548a4d7c..65d866960495 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -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);


        


More information about the llvm-commits mailing list