[Attributor] Initialize effectively unused value to appease UBSAN
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 20 Jul 2021 14:16:56 +0000 (09:16 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 20 Jul 2021 14:18:51 +0000 (09:18 -0500)
llvm/lib/Transforms/IPO/AttributorAttributes.cpp

index 91f57a84fd1e32c625b209c0e344e986d100046f..98bce21cf96538698666bbabc0667cd469cccb9d 100644 (file)
@@ -5144,7 +5144,7 @@ struct AAValueSimplifyImpl : AAValueSimplify {
       if (isa<ConstantPointerNull>(Obj)) {
         // A null pointer access can be undefined but any offset from null may
         // be OK. We do not try to optimize the latter.
-        bool UsedAssumedInformation;
+        bool UsedAssumedInformation = false;
         if (!NullPointerIsDefined(L.getFunction(),
                                   Ptr.getType()->getPointerAddressSpace()) &&
             A.getAssumedSimplified(Ptr, AA, UsedAssumedInformation) == Obj)