[cfe-commits] r146342 - /cfe/trunk/lib/CodeGen/CGValue.h

Benjamin Kramer benny.kra at googlemail.com
Sun Dec 11 08:34:24 PST 2011


Author: d0k
Date: Sun Dec 11 10:34:24 2011
New Revision: 146342

URL: http://llvm.org/viewvc/llvm-project?rev=146342&view=rev
Log:
Reuse forAddr to create ignored AggValueSlots.

Silences valgrind warnings about uninitalized alignment values.

Modified:
    cfe/trunk/lib/CodeGen/CGValue.h

Modified: cfe/trunk/lib/CodeGen/CGValue.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGValue.h?rev=146342&r1=146341&r2=146342&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGValue.h (original)
+++ cfe/trunk/lib/CodeGen/CGValue.h Sun Dec 11 10:34:24 2011
@@ -357,11 +357,8 @@
   /// 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.





More information about the cfe-commits mailing list