[PATCH] D64290: [tools] [llvm-nm] Default to reading from stdin not a.out

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 08:05:01 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-nm/stream-redirection.test:1
+## Test llvm-nm when using stdin both explicitly (using '-' as a filename)
+## and implicitly (not specifying any filename).
----------------
This isn't really about "redirection", so let's just call this test "stdin.test" or similar.

Also, this test should show that no warning is printed in each case (since there could be if the input was coming from a keyboard).


================
Comment at: llvm/test/tools/llvm-nm/stream-redirection.test:5
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-nm %t > %t1
+# RUN: llvm-nm - < %t > %t.explicit
----------------
Put a comment here saying that this is to establish a baseline to compare against. My first reaction was "why are we testing output redirection?"

Perhaps also call the output file %t.base or something to that effect.


================
Comment at: llvm/test/tools/llvm-nm/stream-redirection.test:10
+# RUN: cmp %t1 %t.implicit
+# RUN: cat %t | llvm-nm > %t.namedpipe
+# RUN: cmp %t1 %t.namedpipe
----------------
I don't think you need this test case. It's no different from regular stdin input.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64290/new/

https://reviews.llvm.org/D64290





More information about the llvm-commits mailing list