benlangmuir added inline comments.
================ Comment at: clang/lib/CodeGen/BackendUtil.cpp:194 : Diags(_Diags), HSOpts(HeaderSearchOpts), CodeGenOpts(CGOpts), - TargetOpts(TOpts), LangOpts(LOpts), TheModule(M), + TargetOpts(TOpts), LangOpts(LOpts), TheModule(M), VFS(VFS), CodeGenerationTime("codegen", "Code Generation Time"), ---------------- Nit: `std::move(VFS)` to reduce refcounting. ================ Comment at: clang/lib/CodeGen/CodeGenAction.cpp:164 LLVMIRGenerationRefCount(0), - Gen(CreateLLVMCodeGen(Diags, InFile, std::move(FS), HeaderSearchOpts, - PPOpts, CodeGenOpts, C, CoverageInfo)), + Gen(CreateLLVMCodeGen(Diags, InFile, FS, HeaderSearchOpts, PPOpts, + CodeGenOpts, C, CoverageInfo)), ---------------- Wouldn't `move` be fine here since it's already copied to `this->FS`? ================ Comment at: llvm/lib/ProfileData/SampleProfReader.cpp:1838 + : FS.getBufferForFile(Filename); + // auto BufferOrErr = MemoryBuffer::getFileOrSTDIN(Filename, /*IsText=*/true); if (std::error_code EC = BufferOrErr.getError()) ---------------- Commented out code ================ Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:466 + : SampleProfileLoaderBaseImpl(std::string(Name), std::string(RemapName), + FS), GetAC(std::move(GetAssumptionCache)), ---------------- move? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139052/new/ https://reviews.llvm.org/D139052 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits