[llvm] r249244 - [llvm-size] Fix time to check if time of use bug.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 3 20:43:50 PDT 2015


Thanks!
On Oct 3, 2015 3:45 PM, "Davide Italiano via llvm-commits" <
llvm-commits at lists.llvm.org> wrote:

> 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);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151003/34fb8fc4/attachment.html>


More information about the llvm-commits mailing list