diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Target/Language.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Target/Language.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/llvm-project/lldb/source/Target/Language.cpp b/contrib/llvm-project/lldb/source/Target/Language.cpp index d0bffe441f63..86754c251cd9 100644 --- a/contrib/llvm-project/lldb/source/Target/Language.cpp +++ b/contrib/llvm-project/lldb/source/Target/Language.cpp @@ -510,7 +510,7 @@ bool Language::IsNilReference(ValueObject &valobj) { return false; } bool Language::IsUninitializedReference(ValueObject &valobj) { return false; } -bool Language::GetFunctionDisplayName(const SymbolContext *sc, +bool Language::GetFunctionDisplayName(const SymbolContext &sc, const ExecutionContext *exe_ctx, FunctionNameRepresentation representation, Stream &s) { @@ -528,6 +528,14 @@ void Language::GetDefaultExceptionResolverDescription(bool catch_on, s.Printf("Exception breakpoint (catch: %s throw: %s)", catch_on ? "on" : "off", throw_on ? "on" : "off"); } + +std::optional<bool> Language::GetBooleanFromString(llvm::StringRef str) const { + return llvm::StringSwitch<std::optional<bool>>(str) + .Case("true", {true}) + .Case("false", {false}) + .Default({}); +} + // Constructor Language::Language() = default; |
