[PATCH] D33151: ThinLTO: Verify bitcode before lauching the ThinLTOCodeGenerator.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 15:25:36 PDT 2017
aprantl added a comment.
In https://reviews.llvm.org/D33151#756788, @mehdi_amini wrote:
> It seems to me that it indicates that the check in the `codegen()` method is redundant now. Why do we need it? What about just removing it?
Because llvm-lto invokes codegen() directly after loading the module itself (wihtout going through ThinLTOCodeGenerator for the loading):
void codegen() {
if (InputFilenames.size() != 1 && !OutputFilename.empty())
report_fatal_error("Can't handle a single output filename and multiple "
"input files, do not provide an output filename and "
"the output files will be suffixed from the input "
"ones.");
if (!ThinLTOIndex.empty())
errs() << "Warning: -thinlto-index ignored for codegen stage";
for (auto &Filename : InputFilenames) {
LLVMContext Ctx;
auto TheModule = loadModule(Filename, Ctx);
auto Buffer = ThinGenerator.codegen(*TheModule);
https://reviews.llvm.org/D33151
More information about the llvm-commits
mailing list