[Clang] Fix -Wunused-variable

This commit is contained in:
Aiden Grossman 2026-03-20 16:34:34 +00:00
parent e1347d1977
commit bf57f910ab

View File

@ -6339,7 +6339,8 @@ llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F,
"too many submodules");
if (!ParentModule) {
if (const ModuleFileKey *CurFileKey = CurrentModule->getASTFileKey()) {
if ([[maybe_unused]] const ModuleFileKey *CurFileKey =
CurrentModule->getASTFileKey()) {
// Don't emit module relocation error if we have -fno-validate-pch
if (!bool(PP.getPreprocessorOpts().DisablePCHOrModuleValidation &
DisableValidationForModuleKind::Module)) {