diff options
author | Xinliang David Li <davidxl@google.com> | 2016-05-27 21:23:25 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-05-27 21:23:25 +0000 |
commit | a5135a874c2d1c9998793b8fcd9bbc6f9d1b7be2 (patch) | |
tree | 5a4e48a51cd3c9f1cbe0c772492c892c280022b1 /utils/FileCheck | |
parent | c1712d6440fa798b00db629439568c05c03a98e2 (diff) |
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
Diffstat (limited to 'utils/FileCheck')
-rw-r--r-- | utils/FileCheck/FileCheck.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp index 69f93020317..08055cae96a 100644 --- a/utils/FileCheck/FileCheck.cpp +++ b/utils/FileCheck/FileCheck.cpp @@ -1298,6 +1298,13 @@ static void AddCheckPrefixIfNeeded() { 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 @@ int main(int argc, char **argv) { if (File->getBufferSize() == 0 && !AllowEmptyInput) { errs() << "FileCheck error: '" << InputFilename << "' is empty.\n"; + DumpCommandLine(argc, argv); return 2; } |