From 0ab0bb91aad5fd880399ab78bc06d7e140e66b84 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 26 Jul 2019 11:46:21 +0000 Subject: [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 --- lldb/utils/TableGen/LLDBOptionDefEmitter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lldb/utils/TableGen/LLDBOptionDefEmitter.cpp') 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"); -- cgit v1.2.3