Skip to content

Commit

Permalink
[llvm-dis][NFC] Avoid unnecessary copies while iterating (llvm#109860)
Browse files Browse the repository at this point in the history
Avoid unnecessary copies while iterating on input files
  • Loading branch information
AmrDeveloper authored Sep 26, 2024
1 parent f9cba2e commit 3e0d31c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/tools/llvm-dis/llvm-dis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ int main(int argc, char **argv) {
return 1;
}

for (std::string InputFilename : InputFilenames) {
for (const auto &InputFilename : InputFilenames) {
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
MemoryBuffer::getFileOrSTDIN(InputFilename);
if (std::error_code EC = BufferOrErr.getError()) {
Expand Down

0 comments on commit 3e0d31c

Please sign in to comment.