projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c01f2d
)
Allow invertable -xno- style optins as well.
author
Mike Stump
<mrs@apple.com>
Fri, 27 Mar 2009 20:12:55 +0000
(20:12 +0000)
committer
Mike Stump
<mrs@apple.com>
Fri, 27 Mar 2009 20:12:55 +0000
(20:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67862
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/CommandLine.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/CommandLine.h
b/include/llvm/Support/CommandLine.h
index 1c6b3337dfdad8c34b0342ca34b9ab705ad0e973..52052e44654e423f4d7a0980c59188d75ae9349e 100644
(file)
--- a/
include/llvm/Support/CommandLine.h
+++ b/
include/llvm/Support/CommandLine.h
@@
-544,10
+544,14
@@
public:
if (IsInvertable) {
char *s = new char [strlen(ArgStr) + 3 + 1];
s[0] = ArgStr[0];
- s[1] = 'n';
- s[2] = 'o';
- s[3] = '-';
- strcpy(&s[4], ArgStr+1);
+ if (strncmp(ArgStr+1, "no-", 3) == 0)
+ strcpy(&s[1], &ArgStr[4]);
+ else {
+ s[1] = 'n';
+ s[2] = 'o';
+ s[3] = '-';
+ strcpy(&s[4], ArgStr+1);
+ }
OptionNames.push_back(s);
}
}