mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
Avoid some string copies, NFC
llvm-svn: 299993
This commit is contained in:
parent
936496606e
commit
7900831033
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user