Hi,
Please find attached a little bugfix for OptTable initialization of
prefixes. The loop initializing the list of prefixes from the options
list stops before the last entry. If the last entry in the options table
uses a unique prefix, then it won't be parsed.
Thanks,
Mehdi
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index 20214a6..a8ebfa1 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -132,8 +132,8 @@ OptTable::OptTable(const Info *_OptionInfos, unsigned
_NumOptionInfos)
#endif
// Build prefixes.
- for (unsigned i = FirstSearchableIndex+1, e = getNumOptions(); i != e; ++i) {
- if (const char *const *P = getInfo(i).Prefixes) {
+ for (unsigned i = FirstSearchableIndex, e = getNumOptions(); i != e; ++i) {
+ if (const char *const *P = getInfo(i+1).Prefixes) {
for (; *P != 0; ++P) {
PrefixesUnion.insert(*P);
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits