diff --git a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp index 0070f932ac24a..1c0a6116aa0da 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp @@ -9284,16 +9284,17 @@ bool SwiftASTContext::GetCompileUnitImportsImpl( validate_pcm = true; #endif } - - auto &pp_opts = m_clangimporter->getClangPreprocessor() - .getPreprocessorOpts(); - pp_opts.DisablePCHOrModuleValidation = - validate_pcm ? clang::DisableValidationForModuleKind::None - : clang::DisableValidationForModuleKind::All; - pp_opts.ModulesCheckRelocated = validate_pcm; - - LOG_PRINTF(GetLog(LLDBLog::Types), "PCM validation is %s", - validate_pcm ? "disabled" : "enabled"); + + const auto &pp_opts = + m_clangimporter->getClangPreprocessor().getPreprocessorOpts(); + // rdar://155232969 + // pp_opts.DisablePCHOrModuleValidation = + // validate_pcm ? clang::DisableValidationForModuleKind::None + // : clang::DisableValidationForModuleKind::All; + // pp_opts.ModulesCheckRelocated = validate_pcm; + + if (!validate_pcm) + LOG_PRINTF(GetLog(LLDBLog::Types), "PCM validation cannot be disabled"); } LOG_PRINTF(GetLog(LLDBLog::Types), "Importing dependencies of current CU"); diff --git a/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.cpp b/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.cpp index 8ace6bc09d4d6..916b75bd8ca44 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.cpp @@ -16,6 +16,7 @@ #include "Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.h" #include "lldb/Core/PluginManager.h" #include "lldb/Symbol/CompileUnit.h" +#include "llvm/Support/Error.h" #include #include @@ -207,6 +208,13 @@ bool TypeSystemSwift::GetPtrAuthAddressDiversity( return false; } +llvm::Expected TypeSystemSwift::GetDereferencedType( + lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, + std::string &deref_name, uint32_t &deref_byte_size, + int32_t &deref_byte_offset, ValueObject *valobj, uint64_t &language_flags) { + return llvm::createStringError("Swift types cannot be dereferenced"); +} + namespace llvm { llvm::raw_ostream & operator<<(llvm::raw_ostream &os, diff --git a/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h b/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h index d389fba4e8c86..75d04a6d3db6d 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h +++ b/lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h @@ -350,6 +350,12 @@ class TypeSystemSwift : public TypeSystem { unsigned GetPtrAuthDiscriminator(lldb::opaque_compiler_type_t type) override; bool GetPtrAuthAddressDiversity(lldb::opaque_compiler_type_t type) override; + llvm::Expected + GetDereferencedType(lldb::opaque_compiler_type_t type, + ExecutionContext *exe_ctx, std::string &deref_name, + uint32_t &deref_byte_size, int32_t &deref_byte_offset, + ValueObject *valobj, uint64_t &language_flags) override; + /// \} protected: /// Used in the logs.