mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ClangImporter] Skip importing values for CGFloat typedefs on top of CGFloats direct
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user