summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-12-24 23:15:17 +0000
committerpatrick <patrick@openbsd.org>2017-12-24 23:15:17 +0000
commit34091ed6d5747c7d4acdc1ef6af75ce9b7a8adba (patch)
tree53479f738fa2c63ce6cf95113985510e3653de23 /gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
parentConsolidate printf(3) calls at the end of main(). (diff)
downloadwireguard-openbsd-34091ed6d5747c7d4acdc1ef6af75ce9b7a8adba.tar.xz
wireguard-openbsd-34091ed6d5747c7d4acdc1ef6af75ce9b7a8adba.zip
Import LLVM 5.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp b/gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
index 9572bd3543b..63c7b3d10bf 100644
--- a/gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
+++ b/gnu/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
@@ -3309,12 +3309,7 @@ static Address emitOMPArraySectionBase(CodeGenFunction &CGF, const Expr *Base,
LValue CodeGenFunction::EmitOMPArraySectionExpr(const OMPArraySectionExpr *E,
bool IsLowerBound) {
- QualType BaseTy;
- if (auto *ASE =
- dyn_cast<OMPArraySectionExpr>(E->getBase()->IgnoreParenImpCasts()))
- BaseTy = OMPArraySectionExpr::getBaseOriginalType(ASE);
- else
- BaseTy = E->getBase()->getType();
+ QualType BaseTy = OMPArraySectionExpr::getBaseOriginalType(E->getBase());
QualType ResultExprTy;
if (auto *AT = getContext().getAsArrayType(BaseTy))
ResultExprTy = AT->getElementType();
@@ -3619,8 +3614,9 @@ LValue CodeGenFunction::EmitLValueForField(LValue base,
getFieldAlignmentSource(BaseInfo.getAlignmentSource());
LValueBaseInfo FieldBaseInfo(fieldAlignSource, BaseInfo.getMayAlias());
+ QualType type = field->getType();
const RecordDecl *rec = field->getParent();
- if (rec->isUnion() || rec->hasAttr<MayAliasAttr>())
+ if (rec->isUnion() || rec->hasAttr<MayAliasAttr>() || type->isVectorType())
FieldBaseInfo.setMayAlias(true);
bool mayAlias = FieldBaseInfo.getMayAlias();
@@ -3645,7 +3641,6 @@ LValue CodeGenFunction::EmitLValueForField(LValue base,
return LValue::MakeBitfield(Addr, Info, fieldType, FieldBaseInfo);
}
- QualType type = field->getType();
Address addr = base.getAddress();
unsigned cvr = base.getVRQualifiers();
bool TBAAPath = CGM.getCodeGenOpts().StructPathTBAA;