Revert r314977 "[CodeGen] Unify generation of scalar and struct-path TBAA tags"
D37826 has been mistakenly committed where it should be the patch from D38503.
Differential Revision: https://reviews.llvm.org/D38503
llvm-svn: 314978
diff --git a/clang/lib/CodeGen/CGAtomic.cpp b/clang/lib/CodeGen/CGAtomic.cpp
index 54966dd..c03e06d 100644
--- a/clang/lib/CodeGen/CGAtomic.cpp
+++ b/clang/lib/CodeGen/CGAtomic.cpp
@@ -205,7 +205,7 @@
addr = CGF.Builder.CreateStructGEP(addr, 0, CharUnits());
return LValue::MakeAddr(addr, getValueType(), CGF.getContext(),
- LVal.getBaseInfo(), LVal.getTBAAInfo());
+ LVal.getBaseInfo(), LVal.getTBAAAccessType());
}
/// \brief Emits atomic load.
@@ -1425,7 +1425,8 @@
// Other decoration.
if (IsVolatile)
Load->setVolatile(true);
- CGF.CGM.DecorateInstructionWithTBAA(Load, LVal.getTBAAInfo());
+ if (LVal.getTBAAAccessType())
+ CGF.CGM.DecorateInstructionWithTBAA(Load, LVal.getTBAAAccessType());
return Load;
}
@@ -1941,7 +1942,8 @@
// Other decoration.
if (IsVolatile)
store->setVolatile(true);
- CGM.DecorateInstructionWithTBAA(store, dest.getTBAAInfo());
+ if (dest.getTBAAAccessType())
+ CGM.DecorateInstructionWithTBAA(store, dest.getTBAAAccessType());
return;
}