diff options
author | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-01-27 09:02:19 +0000 |
---|---|---|
committer | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-01-27 09:02:19 +0000 |
commit | 447abc57c554fd8fff14a52d32e68dff9a47cc5b (patch) | |
tree | 938a4f94c2bd6d2a4ef9a93e0db39e21d831b818 /llvm/utils/FileCheck/FileCheck.cpp | |
parent | e97834e28fc8d6c55c5c11400b5807ca5345b641 (diff) | |
download | bcm5719-llvm-447abc57c554fd8fff14a52d32e68dff9a47cc5b.tar.gz bcm5719-llvm-447abc57c554fd8fff14a52d32e68dff9a47cc5b.zip |
Revert "Detect incorrect FileCheck variable CLI definition"
This reverts commit r351039.
llvm-svn: 352309
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
-rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 0d5f38acfa7..eb1b5ddfc7e 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -50,10 +50,9 @@ static cl::list<std::string> ImplicitCheckNot( "this pattern occur which are not matched by a positive pattern"), cl::value_desc("pattern")); -static cl::list<std::string> - GlobalDefines("D", cl::AlwaysPrefix, - cl::desc("Define a variable to be used in capture patterns."), - cl::value_desc("VAR=VALUE")); +static cl::list<std::string> GlobalDefines("D", cl::Prefix, + cl::desc("Define a variable to be used in capture patterns."), + cl::value_desc("VAR=VALUE")); static cl::opt<bool> AllowEmptyInput( "allow-empty", cl::init(false), @@ -526,25 +525,8 @@ int main(int argc, char **argv) { for (auto CheckNot : ImplicitCheckNot) Req.ImplicitCheckNot.push_back(CheckNot); - bool GlobalDefineError = false; - for (auto G : GlobalDefines) { - size_t EqIdx = G.find('='); - if (EqIdx == std::string::npos) { - errs() << "Missing equal sign in command-line definition '-D" << G - << "'\n"; - GlobalDefineError = true; - continue; - } - if (EqIdx == 0) { - errs() << "Missing pattern variable name in command-line definition '-D" - << G << "'\n"; - GlobalDefineError = true; - continue; - } + for (auto G : GlobalDefines) Req.GlobalDefines.push_back(G); - } - if (GlobalDefineError) - return 2; Req.AllowEmptyInput = AllowEmptyInput; Req.EnableVarScope = EnableVarScope; |