diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-09 00:21:45 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-09 00:21:45 +0000 |
commit | 81979822cbf6347116d06dac0e5b06c451bcff05 (patch) | |
tree | 7506dbcb4c0ddb48b709f48e90ca7f1db65a409b /lib/CodeGen/CGObjCMac.cpp | |
parent | 8caec849a765de7b0b4ae8b9769397ce62236321 (diff) |
Block ivar layout must assume that the 'isa'
field of the block descriptor is GC'able (scanned)
as this what the runtime expects (one can send it
messages). Radar 8394947.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 9bd1d661e7..8254135686 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -1675,6 +1675,9 @@ llvm::Constant *CGObjCCommonMac::GCBlockLayout(CodeGen::CodeGenFunction &CGF, unsigned WordSizeInBits = CGM.getContext().Target.getPointerWidth(0); unsigned ByteSizeInBits = CGM.getContext().Target.getCharWidth(); + // __isa is the first field in block descriptor and must assume by runtime's + // convention that it is GC'able. + IvarsInfo.push_back(GC_IVAR(0, 1)); for (size_t i = 0; i < DeclRefs.size(); ++i) { const BlockDeclRefExpr *BDRE = DeclRefs[i]; const ValueDecl *VD = BDRE->getDecl(); |