summaryrefslogtreecommitdiff
path: root/lldb/source/API/SBStructuredData.cpp
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2024-08-07 14:00:59 -0700
committerFlorian Mayer <fmayer@google.com>2024-08-07 14:00:59 -0700
commit890289dfb61757cc3f8fd5feb093131ebc3b7477 (patch)
treeb9b69f1881544d20a2c05f84c42a0a5805128f4e /lldb/source/API/SBStructuredData.cpp
parentb58d0717d588624eae77aea330e94f52607448c9 (diff)
parent6a3604ef8592edf39fedd6af8100aefafd6d931d (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.cpp7
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;
}