summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/CommandLine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 1b4d2c72875..16db4d63960 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -111,6 +111,13 @@ void Option::addArgument() {
MarkOptionsChanged();
}
+void Option::removeArgument() {
+ assert(NextRegistered != 0 && "argument never registered");
+ assert(RegisteredOptionList == this && "argument is not the last registered");
+ RegisteredOptionList = NextRegistered;
+ MarkOptionsChanged();
+}
+
// This collects the different option categories that have been registered.
typedef SmallPtrSet<OptionCategory*,16> OptionCatSet;
static ManagedStatic<OptionCatSet> RegisteredOptionCategories;
OpenPOWER on IntegriCloud