Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

77 lines
2.2 KiB
C++

//===-- CFBasicHash.h -------------------------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_CFBASICHASH_H
#define LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_CFBASICHASH_H
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
namespace lldb_private {
class CFBasicHash {
public:
enum class HashType { set = 0, dict };
CFBasicHash() = default;
~CFBasicHash() = default;
bool Update(lldb::addr_t addr, ExecutionContextRef exe_ctx_rf);
bool IsValid() const;
bool IsMutable() const { return m_mutable; };
bool IsMultiVariant() const { return m_multi; }
HashType GetType() const { return m_type; }
size_t GetCount() const;
lldb::addr_t GetKeyPointer() const;
lldb::addr_t GetValuePointer() const;
private:
template <typename T> struct __CFBasicHash {
struct RuntimeBase {
T cfisa;
T cfinfoa;
} base;
struct Bits {
uint16_t __reserved0;
uint16_t __reserved1 : 2;
uint16_t keys_offset : 1;
uint16_t counts_offset : 2;
uint16_t counts_width : 2;
uint16_t __reserved2 : 9;
uint32_t used_buckets; // number of used buckets
uint64_t deleted : 16; // number of elements deleted
uint64_t num_buckets_idx : 8; // index to number of buckets
uint64_t __reserved3 : 40;
uint64_t __reserved4;
} bits;
T pointers[3];
};
template <typename T> bool UpdateFor(std::unique_ptr<__CFBasicHash<T>> &m_ht);
size_t GetPointerCount() const;
uint32_t m_ptr_size = UINT32_MAX;
lldb::ByteOrder m_byte_order = lldb::eByteOrderInvalid;
Address m_address;
std::unique_ptr<__CFBasicHash<uint32_t>> m_ht_32 = nullptr;
std::unique_ptr<__CFBasicHash<uint64_t>> m_ht_64 = nullptr;
ExecutionContextRef m_exe_ctx_ref;
bool m_mutable = true;
bool m_multi = false;
HashType m_type = HashType::set;
};
} // namespace lldb_private
#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_CFBASICHASH_H