File tree Expand file tree Collapse file tree
tools/clang/unittests/HLSLTestLib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1333,14 +1333,14 @@ int run_main() {
13331333 MemoryBuffer::getMemBuffer (MemoryBufferRef (StringRef (InputForStdin), " -" )) :
13341334 MemoryBuffer::getFile (InputFilename);
13351335 if (std::error_code EC = FileOrErr.getError ()) {
1336- errs () << " Could not open input file '" << InputFilename
1336+ test_errs << " Could not open input file '" << InputFilename
13371337 << " ': " << EC.message () << ' \n ' ;
13381338 return 2 ;
13391339 }
13401340 std::unique_ptr<MemoryBuffer> &File = FileOrErr.get ();
13411341
13421342 if (File->getBufferSize () == 0 && !AllowEmptyInput) {
1343- errs () << " FileCheck error: '" << InputFilename << " ' is empty.\n " ;
1343+ test_errs << " FileCheck error: '" << InputFilename << " ' is empty.\n " ;
13441344 return 2 ;
13451345 }
13461346
Original file line number Diff line number Diff line change @@ -139,8 +139,10 @@ FileRunCommandResult FileRunCommandPart::RunFileChecker(const FileRunCommandResu
139139 auto args = strtok (Arguments);
140140 for (const std::string& arg : args) {
141141 if (arg == " %s" ) hasInputFilename = true ;
142- else if (arg == " -input=stderr" ) t.InputForStdin = Prior->StdErr ;
143- else if (strstartswith (arg, checkPrefixStr))
142+ else if (arg == " -input=stderr" ) {
143+ t.InputForStdin = Prior->StdErr ;
144+ t.AllowEmptyInput = true ;
145+ } else if (strstartswith (arg, checkPrefixStr))
144146 t.CheckPrefixes .emplace_back (arg.substr (sizeof (checkPrefixStr) - 1 ));
145147 else if (strstartswith (arg, checkPrefixesStr)) {
146148 auto prefixes = strtok (arg.substr (sizeof (checkPrefixesStr) - 1 ), " , " );
You can’t perform that action at this time.
0 commit comments