The following code is failing in IntegerLiteral::Create because the value is 8 bytes, but the UnsignedLongTy is 4 bytes.
IntegerLiteral* Synthesize::IntegerLiteralExpr(ASTContext& C, uint64_t Ptr) {
const llvm::APInt Addr(8 * sizeof(void *), Ptr);
return IntegerLiteral::Create(C, Addr, C.UnsignedLongTy, SourceLocation());
}
Should it be UnsignedLongLongTy or is the UnsignedLongTy supposed to be 8 bytes?
I couldn’t find where the bitwidth of the builtin types are actually defined.