diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-18 22:39:16 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-18 22:39:16 +0000 |
| commit | 148d113e556077a3cf20b213729d34b752cb1c46 (patch) | |
| tree | e91747572d2695f0f30fe634406740fa730b5bed /clang/lib/CodeGen | |
| parent | 7a55a32108982b9ed585c6e3fb2052a5d88409e8 (diff) | |
| download | bcm5719-llvm-148d113e556077a3cf20b213729d34b752cb1c46.tar.gz bcm5719-llvm-148d113e556077a3cf20b213729d34b752cb1c46.zip | |
Fix a bug where write-barriers for assignment through reference
types was not being generated for objc pointers.
// rdar://8681766.
llvm-svn: 119751
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 6bfafca857e..286665da867 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1198,7 +1198,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { V = Builder.CreateLoad(V, "tmp"); LValue LV = MakeAddrLValue(V, E->getType(), Alignment); - if (NonGCable) { + if (NonGCable && !VD->getType()->isReferenceType()) { LV.getQuals().removeObjCGCAttr(); LV.setNonGC(true); } |

