Use the simpler sys::fs:;exists. NFC.

llvm-svn: 217617
This commit is contained in:
Rafael Espindola
2014-09-11 18:44:26 +00:00
parent 5d2c0dfe4c
commit 3e5cc65efa

View File

@@ -444,8 +444,7 @@ static bool checkMachOAndArchFlags(ObjectFile *o, StringRef file) {
static void PrintFileSectionSizes(StringRef file) {
// If file is not stdin, check that it exists.
if (file != "-") {
bool exists;
if (sys::fs::exists(file, exists) || !exists) {
if (!sys::fs::exists(file)) {
errs() << ToolName << ": '" << file << "': "
<< "No such file\n";
return;