Skip to content

Commit

Permalink
Avoid some string copies, NFC
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299993 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
vedantk committed Apr 11, 2017
1 parent b66309b commit 15d522b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/llvm-cat/llvm-cat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(int argc, char **argv) {
SmallVector<char, 0> Buffer;
BitcodeWriter Writer(Buffer);
if (BinaryCat) {
for (std::string InputFilename : InputFilenames) {
for (const auto &InputFilename : InputFilenames) {
std::unique_ptr<MemoryBuffer> MB = ExitOnErr(
errorOrToExpected(MemoryBuffer::getFileOrSTDIN(InputFilename)));
std::vector<BitcodeModule> Mods = ExitOnErr(getBitcodeModuleList(*MB));
Expand All @@ -49,7 +49,7 @@ int main(int argc, char **argv) {
BitcodeMod.getBuffer().end());
}
} else {
for (std::string InputFilename : InputFilenames) {
for (const auto &InputFilename : InputFilenames) {
SMDiagnostic Err;
std::unique_ptr<Module> M = parseIRFile(InputFilename, Err, Context);
if (!M) {
Expand Down

0 comments on commit 15d522b

Please sign in to comment.