diff options
author | Mike Stump <mrs@apple.com> | 2009-02-13 16:55:51 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-02-13 16:55:51 +0000 |
commit | 56129b1f98e8a40d493476fdb7f57cee63ceb7e7 (patch) | |
tree | b81e30b24479aa0a6bdfef4e581c410400996d39 /lib/CodeGen/CGBlocks.cpp | |
parent | e5fee25e71266712522cff554f25c59b3078a429 (diff) |
Size should be unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 25c5ab6b71..f987af70d3 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -36,29 +36,28 @@ llvm::Constant *CodeGenFunction::BuildDescriptorBlockDecl() { const llvm::PointerType *PtrToInt8Ty = llvm::PointerType::getUnqual(llvm::Type::Int8Ty); + const llvm::Type *UnsignedLongTy + = CGM.getTypes().ConvertType(getContext().UnsignedLongTy); llvm::Constant *C; std::vector<llvm::Constant*> Elts; // reserved - const llvm::IntegerType *LongTy - = cast<llvm::IntegerType>( - CGM.getTypes().ConvertType(CGM.getContext().LongTy)); - C = llvm::ConstantInt::get(LongTy, 0); + C = llvm::ConstantInt::get(UnsignedLongTy, 0); Elts.push_back(C); // Size // FIXME: This should be the size of BlockStructType - C = llvm::ConstantInt::get(LongTy, 20); + C = llvm::ConstantInt::get(UnsignedLongTy, 20); Elts.push_back(C); if (BlockHasCopyDispose) { // copy_func_helper_decl - C = llvm::ConstantInt::get(LongTy, 0); + C = llvm::ConstantInt::get(UnsignedLongTy, 0); C = llvm::ConstantExpr::getBitCast(C, PtrToInt8Ty); Elts.push_back(C); // destroy_func_decl - C = llvm::ConstantInt::get(LongTy, 0); + C = llvm::ConstantInt::get(UnsignedLongTy, 0); C = llvm::ConstantExpr::getBitCast(C, PtrToInt8Ty); Elts.push_back(C); } |