From: Davide Italiano Date: Sat, 3 Oct 2015 19:44:06 +0000 (+0000) Subject: [llvm-size] Fix time to check if time of use bug. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=982ae9e22d9c4e887d5db75afc913286dd54c28f;hp=3e07e8cf77ac32d34379f6af2d4b0d71421905ed [llvm-size] Fix time to check if time of use bug. This was the last tool relying on this pattern. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249244 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/tools/llvm-size/basic.test b/test/tools/llvm-size/basic.test new file mode 100644 index 00000000000..89a38098b0e --- /dev/null +++ b/test/tools/llvm-size/basic.test @@ -0,0 +1,2 @@ +RUN: llvm-size %t.blah 2>&1 | FileCheck --check-prefix=ENOENT %s +ENOENT: {{.*}}llvm-size: {{.*}}.blah: {{[Nn]}}o such file or directory diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp index 9a6e2c1ae4b..de2b0450523 100644 --- a/tools/llvm-size/llvm-size.cpp +++ b/tools/llvm-size/llvm-size.cpp @@ -413,14 +413,6 @@ static bool checkMachOAndArchFlags(ObjectFile *o, StringRef file) { /// @brief Print the section sizes for @p file. If @p file is an archive, print /// the section sizes for each archive member. static void PrintFileSectionSizes(StringRef file) { - // If file is not stdin, check that it exists. - if (file != "-") { - if (!sys::fs::exists(file)) { - errs() << ToolName << ": '" << file << "': " - << "No such file\n"; - return; - } - } // Attempt to open the binary. ErrorOr> BinaryOrErr = createBinary(file);