================ @@ -0,0 +1,90 @@ +#include "CIRGenTypes.h" + +#include "CIRGenModule.h" + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Type.h" + +using namespace clang; +using namespace clang::CIRGen; + +CIRGenTypes::CIRGenTypes(CIRGenModule &genModule) + : cgm(genModule), context(genModule.getASTContext()) {} + +CIRGenTypes::~CIRGenTypes() {} + +mlir::Type CIRGenTypes::convertType(QualType type) { + type = context.getCanonicalType(type); + const Type *ty = type.getTypePtr(); + + mlir::Type resultType = nullptr; + switch (ty->getTypeClass()) { + case Type::Builtin: { + switch (cast<BuiltinType>(ty)->getKind()) { + // Signed types. + case BuiltinType::Accum: + case BuiltinType::Char_S: + case BuiltinType::Fract: + case BuiltinType::Int: + case BuiltinType::Int128: + case BuiltinType::Long: + case BuiltinType::LongAccum: ---------------- erichkeane wrote:
I see some additional fixed-point types here (Accum/Fract). Can we have tests for that, or let that fall-through and assert? https://github.com/llvm/llvm-project/pull/118743 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits