[obj2yaml] Fix "time of check to time of use" bug. Add a test.
[oota-llvm.git] / tools / obj2yaml / obj2yaml.cpp
index b64096d75fa4d3f0ab4ce890debc1c495d4da25f..ee6284da6e417229aabb99a849e8b820067319e6 100644 (file)
@@ -29,9 +29,6 @@ static std::error_code dumpObject(const ObjectFile &Obj) {
 }
 
 static std::error_code dumpInput(StringRef File) {
-  if (File != "-" && !sys::fs::exists(File))
-    return obj2yaml_error::file_not_found;
-
   ErrorOr<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
   if (std::error_code EC = BinaryOrErr.getError())
     return EC;