diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-07-26 11:46:21 +0000 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-07-26 11:46:21 +0000 |
| commit | 0ab0bb91aad5fd880399ab78bc06d7e140e66b84 (patch) | |
| tree | 6e6a9088e408b02f21ce66112b5d0bbe728b7285 /lldb/utils/TableGen/LLDBOptionDefEmitter.cpp | |
| parent | c229cfeb7a7e8c9fefafac6b8576f8a0aa1dee3a (diff) | |
| download | bcm5719-llvm-0ab0bb91aad5fd880399ab78bc06d7e140e66b84.tar.gz bcm5719-llvm-0ab0bb91aad5fd880399ab78bc06d7e140e66b84.zip | |
[lldb] Don't dynamically allocate the posix option validator.
We dynamically allocate the option validator which means we
can't mark this list of OptionDefinitions as constexpr. It's also
more complicated than necessary.
llvm-svn: 367102
Diffstat (limited to 'lldb/utils/TableGen/LLDBOptionDefEmitter.cpp')
| -rw-r--r-- | lldb/utils/TableGen/LLDBOptionDefEmitter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp b/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp index 537f71cd582..844d258568e 100644 --- a/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp +++ b/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp @@ -81,7 +81,13 @@ static void emitOption(Record *Option, raw_ostream &OS) { OS << "eRequiredArgument"; } else OS << "eNoArgument"; - OS << ", nullptr, "; + OS << ", "; + + if (Option->getValue("Validator")) + OS << Option->getValueAsString("Validator"); + else + OS << "nullptr"; + OS << ", "; if (Option->getValue("ArgEnum")) OS << Option->getValueAsString("ArgEnum"); |

