diff --git a/llvm/include/llvm/FileCheck/FileCheck.h b/llvm/include/llvm/FileCheck/FileCheck.h --- a/llvm/include/llvm/FileCheck/FileCheck.h +++ b/llvm/include/llvm/FileCheck/FileCheck.h @@ -30,6 +30,7 @@ std::vector ImplicitCheckNot; std::vector GlobalDefines; bool AllowEmptyInput = false; + bool AllowUnusedPrefixes = false; bool MatchFullLines = false; bool IgnoreCase = false; bool IsDefaultCheckPrefix = false; diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -77,6 +77,10 @@ cl::desc("Allow the input file to be empty. This is useful when making\n" "checks that some error message does not occur, for example.")); +static cl::opt AllowUnusedPrefixes( + "allow-unused-prefixes", cl::init(false), + cl::desc("Allow prefixes to be specified but not appear in the test.")); + static cl::opt MatchFullLines( "match-full-lines", cl::init(false), cl::desc("Require all positive matches to cover an entire input line.\n" @@ -771,6 +775,7 @@ return 2; Req.AllowEmptyInput = AllowEmptyInput; + Req.AllowUnusedPrefixes = AllowUnusedPrefixes; Req.EnableVarScope = EnableVarScope; Req.AllowDeprecatedDagOverlap = AllowDeprecatedDagOverlap; Req.Verbose = Verbose;