Use the simpler sys::fs:;exists. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 11 Sep 2014 18:44:26 +0000 (18:44 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 11 Sep 2014 18:44:26 +0000 (18:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217617 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-size/llvm-size.cpp

index 0b0b00b05cf98cd4311dd9880b494ee3f25ccdc0..1e88183df92311985a4414dc51e8dcdc10bb14d5 100644 (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 != "-") {
 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;
       errs() << ToolName << ": '" << file << "': "
              << "No such file\n";
       return;