1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Add an assertion for cl::opt names: they can't start with '-'

llvm-svn: 290467
This commit is contained in:
Mehdi Amini 2016-12-23 23:55:26 +00:00
parent 687c85635c
commit 6551bb927c

View File

@ -373,6 +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 '-");
ArgStr = S;
}