mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Eliminate some unnessary Path::exists() calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user