@@ -2165,7 +2165,11 @@ LValue CodeGenFunction::EmitLoadOfReferenceLValue(Address RefAddr,
2165
2165
2166
2166
Address CodeGenFunction::EmitLoadOfPointer (Address Ptr ,
2167
2167
const PointerType *PtrTy,
2168
- LValueBaseInfo *BaseInfo) {
2168
+ LValueBaseInfo *BaseInfo,
2169
+ TBAAAccessInfo *TBAAInfo) {
2170
+ if (TBAAInfo)
2171
+ *TBAAInfo = CGM.getTBAAAccessInfo (PtrTy->getPointeeType ());
2172
+
2169
2173
llvm::Value *Addr = Builder.CreateLoad (Ptr );
2170
2174
return Address (Addr, getNaturalTypeAlignment (PtrTy->getPointeeType (),
2171
2175
BaseInfo,
@@ -2175,9 +2179,9 @@ Address CodeGenFunction::EmitLoadOfPointer(Address Ptr,
2175
2179
LValue CodeGenFunction::EmitLoadOfPointerLValue (Address PtrAddr,
2176
2180
const PointerType *PtrTy) {
2177
2181
LValueBaseInfo BaseInfo;
2178
- Address Addr = EmitLoadOfPointer (PtrAddr, PtrTy, &BaseInfo) ;
2179
- return MakeAddrLValue ( Addr, PtrTy-> getPointeeType (), BaseInfo,
2180
- CGM. getTBAAAccessInfo ( PtrTy->getPointeeType ()) );
2182
+ TBAAAccessInfo TBAAInfo ;
2183
+ Address Addr = EmitLoadOfPointer (PtrAddr , PtrTy, & BaseInfo, &TBAAInfo);
2184
+ return MakeAddrLValue (Addr, PtrTy->getPointeeType (), BaseInfo, TBAAInfo );
2181
2185
}
2182
2186
2183
2187
static LValue EmitGlobalVarDeclLValue (CodeGenFunction &CGF,
0 commit comments