mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
FileCheck: dump command line context with empty input
Differential Revision: http://reviews.llvm.org/D20716 llvm-svn: 271047
This commit is contained in:
parent
1c30a694b9
commit
d44bbb4874
@ -7,5 +7,6 @@
|
|||||||
; NOFOO-NOT: foo
|
; NOFOO-NOT: foo
|
||||||
|
|
||||||
; EMPTY-ERR: FileCheck error: '-' is empty.
|
; 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.
|
; NO-EMPTY-ERR-NOT: FileCheck error: '-' is empty.
|
||||||
; NOT-FOUND: error: expected string not found in input
|
; NOT-FOUND: error: expected string not found in input
|
||||||
|
@ -1298,6 +1298,13 @@ static void AddCheckPrefixIfNeeded() {
|
|||||||
CheckPrefixes.push_back("CHECK");
|
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) {
|
int main(int argc, char **argv) {
|
||||||
sys::PrintStackTraceOnErrorSignal();
|
sys::PrintStackTraceOnErrorSignal();
|
||||||
PrettyStackTraceProgram X(argc, argv);
|
PrettyStackTraceProgram X(argc, argv);
|
||||||
@ -1331,6 +1338,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (File->getBufferSize() == 0 && !AllowEmptyInput) {
|
if (File->getBufferSize() == 0 && !AllowEmptyInput) {
|
||||||
errs() << "FileCheck error: '" << InputFilename << "' is empty.\n";
|
errs() << "FileCheck error: '" << InputFilename << "' is empty.\n";
|
||||||
|
DumpCommandLine(argc, argv);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user