diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-27 20:51:54 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-27 20:51:54 +0000 |
commit | d27047f87dae7c6eb59069b1e5d1368a0b2db5ff (patch) | |
tree | f733f3acf81017ebae48a799470f7a369b715877 /tools/llvm-link | |
parent | 8983846e6934fc52b9f2894fc95e68cbd1f56187 (diff) |
Eliminate some unnessary Path::exists() calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-link')
-rw-r--r-- | tools/llvm-link/llvm-link.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index c60e56ae9b6..f7dad3da5f6 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -62,20 +62,14 @@ static inline std::auto_ptr<Module> 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<Module>(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<Module>(Result); // Load successful! + Err.Print(argv0, errs()); return std::auto_ptr<Module>(); } |