From fba1f340caad12c539c89026949eba502c979977 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Sat, 13 Sep 2025 17:12:14 +0100 Subject: [PATCH] [cxx-interop] Remove dead logic in const import We no longer try to import partial specializations of variables after 77975524. --- lib/ClangImporter/ImportDecl.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/ClangImporter/ImportDecl.cpp b/lib/ClangImporter/ImportDecl.cpp index b951a3357a6ba..304bc5b140fe0 100644 --- a/lib/ClangImporter/ImportDecl.cpp +++ b/lib/ClangImporter/ImportDecl.cpp @@ -4591,15 +4591,11 @@ namespace { bool initIsEvaluatable = false; if (Impl.SwiftContext.ClangImporterOpts.EnableConstValueImporting) { if (auto init = decl->getInit()) { - // Don't import values for partial specializations. TODO: Should we - // stop importing partially specialized variables completely? - bool partial = isa(decl); - // Don't import values when type-dependent or value-dependent. bool typeDependent = decl->getType()->isDependentType(); bool valueDependent = init->isValueDependent(); - initIsEvaluatable = !partial && !typeDependent && !valueDependent; + initIsEvaluatable = !typeDependent && !valueDependent; } }