Skip to content

Commit e4c32a4

Browse files
authored
[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.
1 parent ee63625 commit e4c32a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Frontend/CompilerInstance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ std::unique_ptr<CompilerInstance> CompilerInstance::cloneForModuleCompileImpl(
11911191
FrontendOpts.OriginalModuleMap = std::string(OriginalModuleMapFile);
11921192
// Force implicitly-built modules to hash the content of the module file.
11931193
HSOpts.ModulesHashContent = true;
1194-
FrontendOpts.Inputs = {Input};
1194+
FrontendOpts.Inputs = {std::move(Input)};
11951195

11961196
// Don't free the remapped file buffers; they are owned by our caller.
11971197
PPOpts.RetainRemappedFileBuffers = true;

0 commit comments

Comments
 (0)