diff options
author | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-30 11:49:31 +0000 |
---|---|---|
committer | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2017-10-30 11:49:31 +0000 |
commit | 9f9d157517812d2be68ac72ddf3c3db7c607a527 (patch) | |
tree | 383804591f3d1ebc7b1402bae7ad9c2a2c38a4ec /clang/lib/CodeGen/CGOpenMPRuntime.cpp | |
parent | f5142bf97f82e8eaebcb61767ab426f8e476595a (diff) | |
download | bcm5719-llvm-9f9d157517812d2be68ac72ddf3c3db7c607a527.tar.gz bcm5719-llvm-9f9d157517812d2be68ac72ddf3c3db7c607a527.zip |
[CodeGen] Generate TBAA info for reference loads
Differential Revision: https://reviews.llvm.org/D39177
llvm-svn: 316896
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index b23d601eb88..0a798b89030 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -1037,8 +1037,8 @@ static LValue loadToBegin(CodeGenFunction &CGF, QualType BaseTy, QualType ElTy, if (auto *PtrTy = BaseTy->getAs<PointerType>()) BaseLV = CGF.EmitLoadOfPointerLValue(BaseLV.getAddress(), PtrTy); else { - BaseLV = CGF.EmitLoadOfReferenceLValue(BaseLV.getAddress(), - BaseTy->castAs<ReferenceType>()); + LValue RefLVal = CGF.MakeAddrLValue(BaseLV.getAddress(), BaseTy); + BaseLV = CGF.EmitLoadOfReferenceLValue(RefLVal); } BaseTy = BaseTy->getPointeeType(); } |