summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-12 00:36:29 +0000
committerChris Lattner <sabre@nondot.org>2007-04-12 00:36:29 +0000
commitaf039c53c02a883f2646bc44b39467b1e089c0c8 (patch)
tree625e3dd7fe01ef1672ee322c17ae5a0cf13a9314 /llvm/include/llvm/Support/CommandLine.h
parent180ff253edf44466b0a28e489bee7e421fe79cb1 (diff)
downloadbcm5719-llvm-af039c53c02a883f2646bc44b39467b1e089c0c8.tar.gz
bcm5719-llvm-af039c53c02a883f2646bc44b39467b1e089c0c8.zip
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 llvm-svn: 35935
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 328aae1c98b..c31d79f4e69 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -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.
OpenPOWER on IntegriCloud