[pkg-d-commits] [ldc] 05/14: update FileCheck-3.9.cpp from LLVM

Matthias Klumpp mak at moszumanska.debian.org
Sun Apr 23 22:35:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v0.17.2
in repository ldc.

commit 618818b7da8b20fca03f5b9af5ff51a750448ab7
Author: Rainer Schuetze <r.sagitario at gmx.de>
Date:   Sat Jun 18 11:44:47 2016 +0200

    update FileCheck-3.9.cpp from LLVM
    
    (cherry picked from commit c0027c1a298921bebe5e979ca3884de0d2678b9f)
---
 utils/FileCheck-3.9.cpp | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/utils/FileCheck-3.9.cpp b/utils/FileCheck-3.9.cpp
index 69f9302..6c9b62d 100644
--- a/utils/FileCheck-3.9.cpp
+++ b/utils/FileCheck-3.9.cpp
@@ -45,6 +45,11 @@ InputFilename("input-file", cl::desc("File to check (defaults to stdin)"),
 static cl::list<std::string>
 CheckPrefixes("check-prefix",
               cl::desc("Prefix to use from check file (defaults to 'CHECK')"));
+static cl::alias CheckPrefixesAlias(
+    "check-prefixes", cl::aliasopt(CheckPrefixes), cl::CommaSeparated,
+    cl::NotHidden,
+    cl::desc(
+        "Alias for -check-prefix permitting multiple comma separated values"));
 
 static cl::opt<bool>
 NoCanonicalizeWhiteSpace("strict-whitespace",
@@ -1298,8 +1303,15 @@ 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();
+  sys::PrintStackTraceOnErrorSignal(argv[0]);
   PrettyStackTraceProgram X(argc, argv);
   cl::ParseCommandLineOptions(argc, argv);
 
@@ -1331,6 +1343,7 @@ int main(int argc, char **argv) {
 
   if (File->getBufferSize() == 0 && !AllowEmptyInput) {
     errs() << "FileCheck error: '" << InputFilename << "' is empty.\n";
+    DumpCommandLine(argc, argv);
     return 2;
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list