From 8bbbdd79582a6f1c306d24362ff461b7a0e3ad5d Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 9 Jul 2025 10:36:43 -0700 Subject: [PATCH] [lldb] Comment out Swift specific PCM validation The Preprocessor's options were made `const` in https://github.com/llvm/llvm-project/commit/277ab85d1ccf80750f5193495c0665808c2863de. --- .../TypeSystem/Swift/SwiftASTContext.cpp | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp index 2e6528698d68e..557a781157303 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp @@ -9251,16 +9251,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");