summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2008-12-04 00:10:55 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2008-12-04 00:10:55 +0000
commit45c2f9d32035156251a138a3873bdac610158e0b (patch)
tree7c47c893a929247f17048f6fa183fae89cb4317a /clang
parent75c2661d244a5c7e4ab7d6003ee49111b7dcd0fc (diff)
downloadbcm5719-llvm-45c2f9d32035156251a138a3873bdac610158e0b.tar.gz
bcm5719-llvm-45c2f9d32035156251a138a3873bdac610158e0b.zip
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.
llvm-svn: 60515
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGObjCGNU.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 3f2f99c97c1..aa96bc53ea1 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -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);
OpenPOWER on IntegriCloud