[Attributor] Avoid uninitialized memory read.
authorJohannes Doerfert <johannes@jdoerfert.de>
Sat, 24 Jun 2023 07:25:22 +0000 (00:25 -0700)
committerJohannes Doerfert <johannes@jdoerfert.de>
Sat, 24 Jun 2023 07:35:31 +0000 (00:35 -0700)
llvm/include/llvm/Transforms/IPO/Attributor.h

index 49fa9f8..a532309 100644 (file)
@@ -5795,6 +5795,7 @@ template <Attribute::AttrKind AK>
 bool hasAssumedIRAttr(Attributor &A, const AbstractAttribute &QueryingAA,
                       const IRPosition &IRP, DepClassTy DepClass, bool &IsKnown,
                       bool IgnoreSubsumingPositions = false) {
+  IsKnown = false;
   switch (AK) {
 #define CASE(ATTRNAME, AANAME)                                                 \
   case Attribute::ATTRNAME: {                                                  \