From: David Chisnall Date: Mon, 11 Jan 2010 19:02:35 +0000 (+0000) Subject: Fix type mismatch on 64-bit platforms (GNU ObjC). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f950837b8250c7f08d0b7b15ace0b35740721c9d;p=clang Fix type mismatch on 64-bit platforms (GNU ObjC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93169 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 191aedf10c..a8792bde95 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -1934,7 +1934,7 @@ llvm::GlobalVariable *CGObjCGNU::ObjCIvarOffsetVariable( if (!IvarOffsetPointer) { uint64_t Offset = ComputeIvarBaseOffset(CGM, ID, Ivar); llvm::ConstantInt *OffsetGuess = - llvm::ConstantInt::get(LongTy, Offset, "ivar"); + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), Offset, "ivar"); // Don't emit the guess in non-PIC code because the linker will not be able // to replace it with the real version for a library. In non-PIC code you // must compile with the fragile ABI if you want to use ivars from a