[llvm] r249244 - [llvm-size] Fix time to check if time of use bug.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 3 12:44:07 PDT 2015
Author: davide
Date: Sat Oct 3 14:44:06 2015
New Revision: 249244
URL: http://llvm.org/viewvc/llvm-project?rev=249244&view=rev
Log:
[llvm-size] Fix time to check if time of use bug.
This was the last tool relying on this pattern.
Added:
llvm/trunk/test/tools/llvm-size/
llvm/trunk/test/tools/llvm-size/basic.test
Modified:
llvm/trunk/tools/llvm-size/llvm-size.cpp
Added: llvm/trunk/test/tools/llvm-size/basic.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-size/basic.test?rev=249244&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-size/basic.test (added)
+++ llvm/trunk/test/tools/llvm-size/basic.test Sat Oct 3 14:44:06 2015
@@ -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
Modified: llvm/trunk/tools/llvm-size/llvm-size.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-size/llvm-size.cpp?rev=249244&r1=249243&r2=249244&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-size/llvm-size.cpp (original)
+++ llvm/trunk/tools/llvm-size/llvm-size.cpp Sat Oct 3 14:44:06 2015
@@ -413,14 +413,6 @@ static bool checkMachOAndArchFlags(Objec
/// @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<OwningBinary<Binary>> BinaryOrErr = createBinary(file);
More information about the llvm-commits
mailing list