================
@@ -487,6 +487,13 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
ResultType = llvm::PointerType::getUnqual(getLLVMContext());
break;
+ case BuiltinType::MetaInfo:
+ // FIXME(Reflection): once consteval-only types are supported,
+ // make this an llvm_unreachable instead because reflection
+ // should not reach here
+ ResultType = llvm::IntegerType::get(getLLVMContext(), 64);
+ break;
----------------
changkhothuychung wrote:
This is supposed to be invalid code in reflection and we should issue
diagnostics. Since we don't implement consteval-only values yet, I just leave
the codegen part as is for now, and for the example above, it will hit this
function -
https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CGExprScalar.cpp#L1985
So for the `BuiltintType::MetaInfo` case in `CodeGenTypes::ConvertType`, we
can't put an assert for now because it will crash the example above. I am
thinking we can leave this as is, and put a note to fix this when we start
implementing consteval-only values. What do you think?
https://github.com/llvm/llvm-project/pull/190356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits