From d27047f87dae7c6eb59069b1e5d1368a0b2db5ff Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 27 May 2010 20:51:54 +0000 Subject: Eliminate some unnessary Path::exists() calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104888 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-link/llvm-link.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'tools/llvm-link') diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index c60e56ae9b..f7dad3da5f 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -62,20 +62,14 @@ static inline std::auto_ptr LoadFile(const char *argv0, } SMDiagnostic Err; - if (Filename.exists()) { - if (Verbose) errs() << "Loading '" << Filename.c_str() << "'\n"; - Module* Result = 0; - - const std::string &FNStr = Filename.str(); - Result = ParseIRFile(FNStr, Err, Context); - if (Result) return std::auto_ptr(Result); // Load successful! - - if (Verbose) - Err.Print(argv0, errs()); - } else { - errs() << "Bitcode file: '" << Filename.c_str() << "' does not exist.\n"; - } + if (Verbose) errs() << "Loading '" << Filename.c_str() << "'\n"; + Module* Result = 0; + + const std::string &FNStr = Filename.str(); + Result = ParseIRFile(FNStr, Err, Context); + if (Result) return std::auto_ptr(Result); // Load successful! + Err.Print(argv0, errs()); return std::auto_ptr(); } -- cgit v1.2.3