Index: llvm/trunk/test/FileCheck/check-empty.txt =================================================================== --- llvm/trunk/test/FileCheck/check-empty.txt +++ llvm/trunk/test/FileCheck/check-empty.txt @@ -7,5 +7,6 @@ ; NOFOO-NOT: foo ; EMPTY-ERR: FileCheck error: '-' is empty. +; EMPTY-ERR-NEXT: FileCheck command line: {{.*}}FileCheck -check-prefix={{.*}}FOO {{.*}}check-empty.txt ; NO-EMPTY-ERR-NOT: FileCheck error: '-' is empty. ; NOT-FOUND: error: expected string not found in input Index: llvm/trunk/utils/FileCheck/FileCheck.cpp =================================================================== --- llvm/trunk/utils/FileCheck/FileCheck.cpp +++ llvm/trunk/utils/FileCheck/FileCheck.cpp @@ -1298,6 +1298,13 @@ CheckPrefixes.push_back("CHECK"); } +static void DumpCommandLine(int argc, char **argv) { + errs() << "FileCheck command line: "; + for (int I = 0; I < argc; I++) + errs() << " " << argv[I]; + errs() << "\n"; +} + int main(int argc, char **argv) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); @@ -1331,6 +1338,7 @@ if (File->getBufferSize() == 0 && !AllowEmptyInput) { errs() << "FileCheck error: '" << InputFilename << "' is empty.\n"; + DumpCommandLine(argc, argv); return 2; }