From: Benjamin Kramer Date: Sun, 11 Dec 2011 16:34:24 +0000 (+0000) Subject: Reuse forAddr to create ignored AggValueSlots. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f32a920c6f21a2719e220cd50d708ab4e5543fd;p=clang Reuse forAddr to create ignored AggValueSlots. Silences valgrind warnings about uninitalized alignment values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146342 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h index b8fe2a25b4..744a6e02f9 100644 --- a/lib/CodeGen/CGValue.h +++ b/lib/CodeGen/CGValue.h @@ -357,11 +357,8 @@ public: /// ignored - Returns an aggregate value slot indicating that the /// aggregate value is being ignored. static AggValueSlot ignored() { - AggValueSlot AV; - AV.Addr = 0; - AV.Quals = Qualifiers(); - AV.DestructedFlag = AV.ObjCGCFlag = AV.ZeroedFlag = AV.AliasedFlag = false; - return AV; + return forAddr(0, CharUnits(), Qualifiers(), IsNotDestructed, + DoesNotNeedGCBarriers, IsNotAliased); } /// forAddr - Make a slot for an aggregate value.