[ClangImporter] Skip importing values for CGFloat typedefs on top of CGFloats direct

This commit is contained in:
Kuba Mracek
2025-07-22 10:10:15 -07:00
parent 78552bb258
commit 6ec280d4e1
7 changed files with 69 additions and 12 deletions

View File

@@ -197,6 +197,16 @@ Type SwiftDeclSynthesizer::getConstantLiteralType(
}
}
bool SwiftDeclSynthesizer::isCGFloat(Type type) {
auto found = ImporterImpl.RawTypes.find(type->getAnyNominal());
if (found == ImporterImpl.RawTypes.end()) {
return false;
}
Type importTy = found->second;
return importTy->isCGFloat();
}
ValueDecl *SwiftDeclSynthesizer::createConstant(Identifier name,
DeclContext *dc, Type type,
const clang::APValue &value,