summaryrefslogtreecommitdiff
path: root/tools/llvm-link
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-27 20:51:54 +0000
committerDan Gohman <gohman@apple.com>2010-05-27 20:51:54 +0000
commitd27047f87dae7c6eb59069b1e5d1368a0b2db5ff (patch)
treef733f3acf81017ebae48a799470f7a369b715877 /tools/llvm-link
parent8983846e6934fc52b9f2894fc95e68cbd1f56187 (diff)
downloadllvm-d27047f87dae7c6eb59069b1e5d1368a0b2db5ff.tar.gz
llvm-d27047f87dae7c6eb59069b1e5d1368a0b2db5ff.tar.bz2
llvm-d27047f87dae7c6eb59069b1e5d1368a0b2db5ff.tar.xz
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.cpp20
1 files changed, 7 insertions, 13 deletions
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<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>();
}