[Clang][NFC] Move Input into SmallVector instead of copy (#143830)

Static analysis flagged Input as a large object that would benefit from
being moved over being copied.
This commit is contained in:
Shafik Yaghmour
2025-06-12 14:30:59 -07:00
committed by GitHub
parent ee6362515d
commit e4c32a4147

View File

@@ -1191,7 +1191,7 @@ std::unique_ptr<CompilerInstance> CompilerInstance::cloneForModuleCompileImpl(
FrontendOpts.OriginalModuleMap = std::string(OriginalModuleMapFile);
// Force implicitly-built modules to hash the content of the module file.
HSOpts.ModulesHashContent = true;
FrontendOpts.Inputs = {Input};
FrontendOpts.Inputs = {std::move(Input)};
// Don't free the remapped file buffers; they are owned by our caller.
PPOpts.RetainRemappedFileBuffers = true;