morehouse added a comment. Do we need to parse the arguments for opt-level, or can we just hardcode `-O2` and remove the argument parsing code?
================ Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:144 + Context); + Module *M = Owner.get(); + if (!M) ---------------- emmettneyman wrote: > morehouse wrote: > > Why not just rename `Owner` to `M` and remove this line? > Reverted it back since the change caused the fuzzer to crash. You will need to move any uses of `M` above the call to `std::move`, since that leaves `M` in an invalid state. ================ Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:90 +// Mimics the opt tool to run an optimization pass over the provided IR +std::string OptLLVM(const std::string &IR, int OLvl) { + // Create a module that will run the optimization passes ---------------- Shouldn't `OLvl` be a `CodeGenOpt::Level`? Repository: rC Clang https://reviews.llvm.org/D49526 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits