GuardWidening - silence static analyzer null dereference warning with assertion....
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 21 Oct 2019 17:15:37 +0000 (17:15 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 21 Oct 2019 17:15:37 +0000 (17:15 +0000)
llvm-svn: 375428

llvm/lib/Transforms/Scalar/GuardWidening.cpp

index e14f44b..2697d78 100644 (file)
@@ -591,7 +591,7 @@ bool GuardWideningImpl::widenCondCommon(Value *Cond0, Value *Cond1,
           else
             Result = RC.getCheckInst();
         }
-
+        assert(Result && "Failed to find result value");
         Result->setName("wide.chk");
       }
       return true;