summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-05-06 21:56:35 +0000
committerAndrew Trick <atrick@apple.com>2013-05-06 21:56:35 +0000
commit61e01721978af4c2979c4b9153e56e72eb6389fb (patch)
tree2d65367ae409f4f41e4a9b48dbf7f6086d9cda83 /lib/Support
parentb7ad33b7195cb99b0cbb1c5308324d328650ca45 (diff)
downloadllvm-61e01721978af4c2979c4b9153e56e72eb6389fb.tar.gz
llvm-61e01721978af4c2979c4b9153e56e72eb6389fb.tar.bz2
llvm-61e01721978af4c2979c4b9153e56e72eb6389fb.tar.xz
Implemented public interface for modifying registered (not positional or sink options) command line options at runtime.
Patch by Dan Liew! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CommandLine.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 8e937794be..18d3db527b 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -1596,3 +1596,13 @@ void cl::AddExtraVersionPrinter(void (*func)()) {
ExtraVersionPrinters->push_back(func);
}
+
+void cl::getRegisteredOptions(StringMap<Option*> &Map)
+{
+ // Get all the options.
+ SmallVector<Option*, 4> PositionalOpts; //NOT USED
+ SmallVector<Option*, 4> SinkOpts; //NOT USED
+ assert(Map.size() == 0 && "StringMap must be empty");
+ GetOptionInfo(PositionalOpts, SinkOpts, Map);
+ return;
+}