[clang][NFC] Extract EmitAssemblyHelper::shouldEmitRegularLTOSummary
The code to check if the regular LTO summary should be emitted and to add the corresponding module flags was duplicated in the 'EmitAssemblyHelper::EmitAssemblyWithLegacyPassManager' and 'EmitAssemblyHelper::RunOptimizationPipeline' methods. In order to eliminate these code duplications, the 'EmitAssemblyHelper::shouldEmitRegularLTOSummary' method has been extracted. The method returns a bool value, the value is 'true' if the module summary should be emitted. The patch keeps the setting of the module flags inline. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D123026
Please register or sign in to comment