[llvm] r248976 - [llvm-objdump] Fix time of check to time of use bug.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 18:02:38 PDT 2015


Author: davide
Date: Wed Sep 30 20:02:37 2015
New Revision: 248976

URL: http://llvm.org/viewvc/llvm-project?rev=248976&view=rev
Log:
[llvm-objdump] Fix time of check to time of use bug.

There's already a test that covers this situation, so we should be
fine.

Modified:
    llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp

Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=248976&r1=248975&r2=248976&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Wed Sep 30 20:02:37 2015
@@ -1501,9 +1501,6 @@ static void DumpArchive(const Archive *a
 
 /// @brief Open file and figure out how to dump it.
 static void DumpInput(StringRef file) {
-  // If file isn't stdin, check that it exists.
-  if (file != "-" && !sys::fs::exists(file))
-    report_error(file, errc::no_such_file_or_directory);
 
   // If we are using the Mach-O specific object file parser, then let it parse
   // the file and process the command line options.  So the -arch flags can




More information about the llvm-commits mailing list