summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-09-09 00:21:45 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-09-09 00:21:45 +0000
commitcfddabf5a308ad414e69d439ec230f6bfc07351d (patch)
tree772a248af4c422039842c0c417f5df26f69ab26d /clang/lib/CodeGen
parent3cf63f1eddc12c5f6a164f82d22b8c6755778bd3 (diff)
downloadbcm5719-llvm-cfddabf5a308ad414e69d439ec230f6bfc07351d.tar.gz
bcm5719-llvm-cfddabf5a308ad414e69d439ec230f6bfc07351d.zip
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. llvm-svn: 113454
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 9bd1d661e7d..82541356863 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud