diff options
| author | Florian Mayer <fmayer@google.com> | 2024-08-07 14:00:59 -0700 |
|---|---|---|
| committer | Florian Mayer <fmayer@google.com> | 2024-08-07 14:00:59 -0700 |
| commit | 890289dfb61757cc3f8fd5feb093131ebc3b7477 (patch) | |
| tree | b9b69f1881544d20a2c05f84c42a0a5805128f4e /lldb/source/API/SBStructuredData.cpp | |
| parent | b58d0717d588624eae77aea330e94f52607448c9 (diff) | |
| parent | 6a3604ef8592edf39fedd6af8100aefafd6d931d (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/fmayer/spr/main.compiler-rt-tsan-leave-bufferedstacktrace-uninit
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'lldb/source/API/SBStructuredData.cpp')
| -rw-r--r-- | lldb/source/API/SBStructuredData.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/API/SBStructuredData.cpp b/lldb/source/API/SBStructuredData.cpp index b18fc5655fc8..78afdc69fe0d 100644 --- a/lldb/source/API/SBStructuredData.cpp +++ b/lldb/source/API/SBStructuredData.cpp @@ -86,7 +86,12 @@ lldb::SBError SBStructuredData::SetFromJSON(lldb::SBStream &stream) { StructuredData::ParseJSON(stream.GetData()); m_impl_up->SetObjectSP(json_obj); - if (!json_obj || json_obj->GetType() != eStructuredDataTypeDictionary) + static constexpr StructuredDataType unsupported_type[] = { + eStructuredDataTypeInvalid, + eStructuredDataTypeGeneric, + }; + + if (!json_obj || llvm::is_contained(unsupported_type, json_obj->GetType())) error.SetErrorString("Invalid Syntax"); return error; } |
