forked from OSchip/llvm-project
CommandLine option: Relax the assertion introduced in r290467 to allows for empty string
This is used in LDC for custom boolean commandline options, setArgStr is called with an empty string before using AddLiteralOption. llvm-svn: 291406
This commit is contained in:
parent
09ad678bc4
commit
e4c7f12274
|
@ -373,7 +373,7 @@ void Option::removeArgument() { GlobalParser->removeOption(this); }
|
|||
void Option::setArgStr(StringRef S) {
|
||||
if (FullyInitialized)
|
||||
GlobalParser->updateArgStr(this, S);
|
||||
assert(S[0] != '-' && "Option can't start with '-");
|
||||
assert((S.empty() || S[0] != '-') && "Option can't start with '-");
|
||||
ArgStr = S;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue