]> granicus.if.org Git - clang/commitdiff
Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several...
authorSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 4 Dec 2008 00:10:55 +0000 (00:10 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Thu, 4 Dec 2008 00:10:55 +0000 (00:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60515 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCGNU.cpp

index 3f2f99c97c166f2d646c3fbd06aee66d854c8fa2..aa96bc53ea13901cc15ff496ac5722e71c68f941 100644 (file)
@@ -159,7 +159,7 @@ CGObjCGNU::CGObjCGNU(CodeGen::CodeGenModule &cgm)
   IntTy = CGM.getTypes().ConvertType(CGM.getContext().IntTy);
   LongTy = CGM.getTypes().ConvertType(CGM.getContext().LongTy);
     
-  Zeros[0] = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0);
+  Zeros[0] = llvm::ConstantInt::get(LongTy, 0);
   Zeros[1] = Zeros[0];
   NULLPtr = llvm::ConstantPointerNull::get(
     llvm::PointerType::getUnqual(llvm::Type::Int8Ty));
@@ -781,7 +781,7 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
   llvm::Constant *ClassStruct =
     GenerateClassStructure(MetaClassStruct, SuperClass, 0x1L,
                            ClassName.c_str(), 0,
-      llvm::ConstantInt::get(llvm::Type::Int32Ty, instanceSize), IvarList,
+      llvm::ConstantInt::get(LongTy, instanceSize), IvarList,
       MethodList, GenerateProtocolList(Protocols));
   // Add class structure to list to be added to the symtab later
   ClassStruct = llvm::ConstantExpr::getBitCast(ClassStruct, PtrToInt8Ty);