[PATCH] D33151: ThinLTO: Verify bitcode before lauching the ThinLTOCodeGenerator.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 10:40:58 PDT 2017


aprantl marked an inline comment as done.
aprantl added a comment.

Thanks for the review!



================
Comment at: include/llvm/Transforms/IPO/FunctionImport.h:58
+  importFunctions(Module &M, const ImportMapTy &ImportList,
+                  Optional<std::function<void(Module &)>> PostProcess = None);
 
----------------
mehdi_amini wrote:
> What about renaming `PostProcess` to `PostBitcodeLoading`? It seems more accurate to me.
Makes sense!


================
Comment at: lib/LTO/ThinLTOCodeGenerator.cpp:205
+  Expected<bool> Result =
+      Importer.importFunctions(TheModule, ImportList, {verifyLoadedModule});
   if (!Result) {
----------------
mehdi_amini wrote:
> Just curious: are the `{` `}` pair required?
Yes, otherwise we are getting an `error: no viable conversion from 'void (llvm::Module &)' to 'Optional<std::function<void (Module &)> >'`


https://reviews.llvm.org/D33151





More information about the llvm-commits mailing list