@@ -1427,6 +1427,8 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
1427
1427
1428
1428
ObjCSuperType = QualType();
1429
1429
1430
+ InitBuiltinType(OCamlValueTy, BuiltinType::OCamlValue);
1431
+
1430
1432
// void * type
1431
1433
if (LangOpts.OpenCLGenericAddressSpace) {
1432
1434
auto Q = VoidTy.getQualifiers();
@@ -2003,6 +2005,10 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
2003
2005
case Type::Builtin:
2004
2006
switch (cast<BuiltinType>(T)->getKind()) {
2005
2007
default: llvm_unreachable("Unknown builtin type!");
2008
+ case BuiltinType::OCamlValue:
2009
+ Width = 64;
2010
+ Align = 64;
2011
+ break;
2006
2012
case BuiltinType::Void:
2007
2013
// GCC extension: alignof(void) = 8 bits.
2008
2014
Width = 0;
@@ -3359,6 +3365,7 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx,
3359
3365
llvm_unreachable("should never get here");
3360
3366
case BuiltinType::AMDGPUBufferRsrc:
3361
3367
case BuiltinType::WasmExternRef:
3368
+ case BuiltinType::OCamlValue:
3362
3369
#define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
3363
3370
#include "clang/Basic/RISCVVTypes.def"
3364
3371
llvm_unreachable("not yet implemented");
@@ -8509,6 +8516,9 @@ static char getObjCEncodingForPrimitiveType(const ASTContext *C,
8509
8516
return ' ';
8510
8517
}
8511
8518
8519
+ case BuiltinType::OCamlValue:
8520
+ llvm_unreachable("@encoding OCaml value type");
8521
+
8512
8522
case BuiltinType::ObjCId:
8513
8523
case BuiltinType::ObjCClass:
8514
8524
case BuiltinType::ObjCSel:
0 commit comments