diff options
Diffstat (limited to 'source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h')
-rw-r--r-- | source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h index 442a3a1fb5e1e..6fdae63d4126e 100644 --- a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h +++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h @@ -1,9 +1,8 @@ //===-- AppleObjCRuntimeV1.h ------------------------------------*- 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 // //===----------------------------------------------------------------------===// @@ -11,18 +10,17 @@ #define liblldb_AppleObjCRuntimeV1_h_ #include "AppleObjCRuntime.h" -#include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/lldb-private.h" +#include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h" + namespace lldb_private { class AppleObjCRuntimeV1 : public AppleObjCRuntime { public: ~AppleObjCRuntimeV1() override = default; - //------------------------------------------------------------------ // Static Functions - //------------------------------------------------------------------ static void Initialize(); static void Terminate(); @@ -32,13 +30,14 @@ public: static lldb_private::ConstString GetPluginNameStatic(); - static bool classof(const ObjCLanguageRuntime *runtime) { - switch (runtime->GetRuntimeVersion()) { - case ObjCRuntimeVersions::eAppleObjC_V1: - return true; - default: - return false; - } + static char ID; + + bool isA(const void *ClassID) const override { + return ClassID == &ID || AppleObjCRuntime::isA(ClassID); + } + + static bool classof(const LanguageRuntime *runtime) { + return runtime->isA(&ID); } lldb::addr_t GetTaggedPointerObfuscator(); @@ -100,9 +99,7 @@ public: UtilityFunction *CreateObjectChecker(const char *) override; - //------------------------------------------------------------------ // PluginInterface protocol - //------------------------------------------------------------------ ConstString GetPluginName() override; uint32_t GetPluginVersion() override; @@ -148,7 +145,7 @@ protected: HashTableSignature m_hash_signature; lldb::addr_t m_isa_hash_table_ptr; - std::unique_ptr<DeclVendor> m_decl_vendor_ap; + std::unique_ptr<DeclVendor> m_decl_vendor_up; private: AppleObjCRuntimeV1(Process *process); |