diff options
Diffstat (limited to 'source/Plugins/Language/ObjC/NSSet.cpp')
| -rw-r--r-- | source/Plugins/Language/ObjC/NSSet.cpp | 48 | 
1 files changed, 16 insertions, 32 deletions
diff --git a/source/Plugins/Language/ObjC/NSSet.cpp b/source/Plugins/Language/ObjC/NSSet.cpp index 7e03d7574af0..ebaa990fb74b 100644 --- a/source/Plugins/Language/ObjC/NSSet.cpp +++ b/source/Plugins/Language/ObjC/NSSet.cpp @@ -1,9 +1,8 @@  //===-- NSSet.cpp -----------------------------------------------*- C++ -*-===//  // -//                     The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception  //  //===----------------------------------------------------------------------===// @@ -15,7 +14,6 @@  #include "lldb/DataFormatters/FormattersHelpers.h"  #include "lldb/Symbol/ClangASTContext.h"  #include "lldb/Target/Language.h" -#include "lldb/Target/ObjCLanguageRuntime.h"  #include "lldb/Target/Target.h"  #include "lldb/Utility/DataBufferHeap.h"  #include "lldb/Utility/Endian.h" @@ -55,7 +53,7 @@ public:    bool MightHaveChildren() override; -  size_t GetIndexOfChildWithName(const ConstString &name) override; +  size_t GetIndexOfChildWithName(ConstString name) override;  private:    struct DataDescriptor_32 { @@ -96,7 +94,7 @@ public:    bool MightHaveChildren() override; -  size_t GetIndexOfChildWithName(const ConstString &name) override; +  size_t GetIndexOfChildWithName(ConstString name) override;  private: @@ -155,28 +153,18 @@ namespace Foundation1437 {      uint32_t _cow;      // __table storage      uint32_t _objs_addr; -    union { -      uint32_t _mutations; -      struct { -        uint32_t _muts; -        uint32_t _used : 26; -        uint32_t _szidx : 6; -      }; -    }; +    uint32_t _muts; +    uint32_t _used : 26; +    uint32_t _szidx : 6;    };    struct DataDescriptor_64 {      uint64_t _cow;      // __Table storage      uint64_t _objs_addr; -    union { -      uint64_t _mutations; -      struct { -        uint32_t _muts; -        uint32_t _used : 26; -        uint32_t _szidx : 6; -      }; -    }; +    uint32_t _muts; +    uint32_t _used : 26; +    uint32_t _szidx : 6;    };    using NSSetMSyntheticFrontEnd = @@ -222,7 +210,7 @@ public:    bool MightHaveChildren() override; -  size_t GetIndexOfChildWithName(const ConstString &name) override; +  size_t GetIndexOfChildWithName(ConstString name) override;  };  } // namespace formatters  } // namespace lldb_private @@ -236,9 +224,7 @@ bool lldb_private::formatters::NSSetSummaryProvider(    if (!process_sp)      return false; -  ObjCLanguageRuntime *runtime = -      (ObjCLanguageRuntime *)process_sp->GetLanguageRuntime( -          lldb::eLanguageTypeObjC); +  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);    if (!runtime)      return false; @@ -315,9 +301,7 @@ lldb_private::formatters::NSSetSyntheticFrontEndCreator(    lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());    if (!process_sp)      return nullptr; -  ObjCLanguageRuntime *runtime = -      (ObjCLanguageRuntime *)process_sp->GetLanguageRuntime( -          lldb::eLanguageTypeObjC); +  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);    if (!runtime)      return nullptr; @@ -385,7 +369,7 @@ lldb_private::formatters::NSSetISyntheticFrontEnd::~NSSetISyntheticFrontEnd() {  size_t  lldb_private::formatters::NSSetISyntheticFrontEnd::GetIndexOfChildWithName( -    const ConstString &name) { +    ConstString name) {    const char *item_name = name.GetCString();    uint32_t idx = ExtractIndexFromString(item_name);    if (idx < UINT32_MAX && idx >= CalculateNumChildren()) @@ -540,7 +524,7 @@ template <typename D32, typename D64>  size_t  lldb_private::formatters::    GenericNSSetMSyntheticFrontEnd<D32, D64>::GetIndexOfChildWithName( -    const ConstString &name) { +    ConstString name) {    const char *item_name = name.GetCString();    uint32_t idx = ExtractIndexFromString(item_name);    if (idx < UINT32_MAX && idx >= CalculateNumChildren())  | 
