[cfe-commits] r60515 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Wed Dec 3 16:10:56 PST 2008
Author: cornedbee
Date: Wed Dec 3 18:10:55 2008
New Revision: 60515
URL: http://llvm.org/viewvc/llvm-project?rev=60515&view=rev
Log:
Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though.
Modified:
cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=60515&r1=60514&r2=60515&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Wed Dec 3 18:10:55 2008
@@ -159,7 +159,7 @@
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 @@
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);
More information about the cfe-commits
mailing list