[lld] r221414 - Fix shadowed variable warning

Nick Kledzik kledzik at apple.com
Wed Nov 5 15:40:04 PST 2014


Author: kledzik
Date: Wed Nov  5 17:40:04 2014
New Revision: 221414

URL: http://llvm.org/viewvc/llvm-project?rev=221414&view=rev
Log:
Fix shadowed variable warning

Modified:
    lld/trunk/lib/Driver/WinLinkDriver.cpp

Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=221414&r1=221413&r2=221414&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Wed Nov  5 17:40:04 2014
@@ -885,14 +885,14 @@ bool WinLinkDriver::parse(int argc, cons
   } else {
     // If /machine option is missing, we need to take a look at
     // the magic byte of the first object file to infer machine type.
-    std::vector<StringRef> files;
+    std::vector<StringRef> filePaths;
     for (auto arg : *parsedArgs)
       if (arg->getOption().getID() == OPT_INPUT)
-        files.push_back(arg->getValue());
+        filePaths.push_back(arg->getValue());
     if (llvm::opt::Arg *arg = parsedArgs->getLastArg(OPT_DASH_DASH))
-      files.insert(files.end(), arg->getValues().begin(),
+      filePaths.insert(filePaths.end(), arg->getValues().begin(),
                    arg->getValues().end());
-    for (StringRef path : files) {
+    for (StringRef path : filePaths) {
       llvm::COFF::MachineTypes type;
       if (!getMachineType(path, type))
         continue;





More information about the llvm-commits mailing list