diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-07 19:39:39 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-07 19:39:39 +0000 |
| commit | a2d7c34e93ad7e33af3e9a9052b7530f697fbc67 (patch) | |
| tree | 4820f388aeb2f4078da117141a318603cccaa7e5 /clang/lib/CodeGen | |
| parent | ebf2e977cf45e4d338d45fdaeae91cee12117377 (diff) | |
| download | bcm5719-llvm-a2d7c34e93ad7e33af3e9a9052b7530f697fbc67.tar.gz bcm5719-llvm-a2d7c34e93ad7e33af3e9a9052b7530f697fbc67.zip | |
Fixed a block regression caused by trying to use
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.
llvm-svn: 105549
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGBlocks.h | 3 |
2 files changed, 0 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index f789787b616..b2d7f2e81d4 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -612,9 +612,6 @@ void CodeGenFunction::AllocateBlockDecl(const BlockDeclRefExpr *E) { llvm::Value *CodeGenFunction::GetAddrOfBlockDecl(const ValueDecl *VD, bool IsByRef) { - llvm::Value *&VE = BlockDeclsValue[VD]; - if (VE) - return VE; CharUnits offset = BlockDecls[VD]; assert(!offset.isZero() && "getting address of unallocated decl"); @@ -648,7 +645,6 @@ llvm::Value *CodeGenFunction::GetAddrOfBlockDecl(const ValueDecl *VD, if (VD->getType()->isReferenceType()) V = Builder.CreateLoad(V, "ref.tmp"); } - VE = V; return V; } diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h index 4d92201d0d9..d0466a86d86 100644 --- a/clang/lib/CodeGen/CGBlocks.h +++ b/clang/lib/CodeGen/CGBlocks.h @@ -181,9 +181,6 @@ public: /// BlockDecls - Offsets for all Decls in BlockDeclRefExprs. llvm::DenseMap<const Decl*, CharUnits> BlockDecls; - /// BlockDeclsValue - llvm::Value for all Decls in BlockDeclRefExprs. - llvm::DenseMap<const Decl*, llvm::Value *> BlockDeclsValue; - /// BlockCXXThisOffset - The offset of the C++ 'this' value within /// the block structure. CharUnits BlockCXXThisOffset; |

