Possible type size bug

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.

Hi,

Which platform is that?

Cheers, Axel.

I’m porting to mingw x86_64.

Hi,

Does my fix to the master work for you?

Cheers, Axel.

Yes, that’s working. Thanks.