From a5986b9e91be95771a034b5efe400e99149f919c Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Sun, 3 Dec 2017 03:10:13 +0000 Subject: Revert "[CodeGen] Add initial support for union members in TBAA" This reverts commit r319413. See PR35503. We can't use "union member" as the access type here like this. llvm-svn: 319629 --- clang/lib/CodeGen/CodeGenModule.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.h') diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index ff9866a..8b14293 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -688,9 +688,8 @@ public: /// getTBAAInfoForSubobject - Get TBAA information for an access with a given /// base lvalue. TBAAAccessInfo getTBAAInfoForSubobject(LValue Base, QualType AccessType) { - TBAAAccessInfo TBAAInfo = Base.getTBAAInfo(); - if (TBAAInfo.isMayAlias() || TBAAInfo.isUnionMember()) - return TBAAInfo; + if (Base.getTBAAInfo().isMayAlias()) + return TBAAAccessInfo::getMayAliasInfo(); return getTBAAAccessInfo(AccessType); } -- cgit v1.1