improve the patch for PR1318 to also support grouped options with custom

handlers (like the pass list).  My previous fix only supported *new* command
line options, not additions to old ones.

This fixes test/Feature/load_module.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35935 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-04-12 00:36:29 +00:00
parent cfa71e026d
commit 69d6f1358c
2 changed files with 17 additions and 7 deletions

View File

@@ -57,6 +57,10 @@ void ParseEnvironmentOptions(const char *progName, const char *envvar,
/// CommandLine utilities to print their own version string.
void SetVersionPrinter(void (*func)());
// MarkOptionsChanged - Internal helper function.
void MarkOptionsChanged();
//===----------------------------------------------------------------------===//
// Flags permitted to be passed to command line arguments
//
@@ -469,6 +473,7 @@ public:
assert(findOption(Name) == Values.size() && "Option already exists!");
Values.push_back(std::make_pair(Name,
std::make_pair(static_cast<DataType>(V),HelpStr)));
MarkOptionsChanged();
}
/// removeLiteralOption - Remove the specified option.