Avoid some string copies, NFC

llvm-svn: 299993
This commit is contained in:
Vedant Kumar 2017-04-11 22:11:46 +00:00
parent ad51539597
commit bb35249308
1 changed files with 2 additions and 2 deletions

View File

@ -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));
@ -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) {