[PATCH] D43501: [lit] Implement non-pipelined 'cat' command for internal shell
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 08:03:57 PST 2018
rnk added a comment.
With the pipelining restriction, this doesn't seem very useful. Typically this is used to send outputs to FileCheck, although we could rewrite most of those uses to stdin redirects (`<`).
================
Comment at: utils/lit/lit/TestRunner.py:585
+ fileToCat = open(filename,"r")
+ contents = contents + fileToCat.read()
+ fileToCat.close();
----------------
Rather than building up a potentially large string in Python memory, I'd prefer to just say `stdout.write(fileToCat.read())`. It's probably clearer, too.
Repository:
rL LLVM
https://reviews.llvm.org/D43501
More information about the llvm-commits
mailing list