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
This commit is contained in:
Andrew Trick
2013-05-06 21:56:35 +00:00
parent b7ad33b719
commit 61e0172197
4 changed files with 142 additions and 3 deletions

View File

@@ -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;
}