llvm.org GIT mirror llvm / a5135a8
FileCheck: dump command line context with empty input Differential Revision: http://reviews.llvm.org/D20716 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271047 91177308-0d34-0410-b5e6-96231b3b80d8 Xinliang David Li 3 years ago
2 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
66 ; NOFOO-NOT: foo
77
88 ; EMPTY-ERR: FileCheck error: '-' is empty.
9 ; EMPTY-ERR-NEXT: FileCheck command line: {{.*}}FileCheck -check-prefix={{.*}}FOO {{.*}}check-empty.txt
910 ; NO-EMPTY-ERR-NOT: FileCheck error: '-' is empty.
1011 ; NOT-FOUND: error: expected string not found in input
12971297 CheckPrefixes.push_back("CHECK");
12981298 }
12991299
1300 static void DumpCommandLine(int argc, char **argv) {
1301 errs() << "FileCheck command line: ";
1302 for (int I = 0; I < argc; I++)
1303 errs() << " " << argv[I];
1304 errs() << "\n";
1305 }
1306
13001307 int main(int argc, char **argv) {
13011308 sys::PrintStackTraceOnErrorSignal();
13021309 PrettyStackTraceProgram X(argc, argv);
13301337
13311338 if (File->getBufferSize() == 0 && !AllowEmptyInput) {
13321339 errs() << "FileCheck error: '" << InputFilename << "' is empty.\n";
1340 DumpCommandLine(argc, argv);
13331341 return 2;
13341342 }
13351343