[Attributor][NFC] Remove ugly and unneeded cast
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 28 Jan 2020 17:49:59 +0000 (11:49 -0600)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 29 Jan 2020 04:54:31 +0000 (22:54 -0600)
llvm/lib/Transforms/IPO/Attributor.cpp

index 400e7127102fde26c872d950165fe443c3c447ac..0598bca17ce74022bc628148ff5814b7185ec460 100644 (file)
@@ -4403,7 +4403,7 @@ struct AAValueSimplifyFloating : AAValueSimplifyImpl {
   ChangeStatus updateImpl(Attributor &A) override {
     bool HasValueBefore = SimplifiedAssociatedValue.hasValue();
 
-    auto VisitValueCB = [&](Value &V, BooleanState, bool Stripped) -> bool {
+    auto VisitValueCB = [&](Value &V, bool, bool Stripped) -> bool {
       auto &AA = A.getAAFor<AAValueSimplify>(*this, IRPosition::value(V));
       if (!Stripped && this == &AA) {
         // TODO: Look the instruction and check recursively.
@@ -4415,9 +4415,9 @@ struct AAValueSimplifyFloating : AAValueSimplifyImpl {
       return checkAndUpdate(A, *this, V, SimplifiedAssociatedValue);
     };
 
-    if (!genericValueTraversal<AAValueSimplify, BooleanState>(
-            A, getIRPosition(), *this, static_cast<BooleanState &>(*this),
-            VisitValueCB))
+    bool Dummy;
+    if (!genericValueTraversal<AAValueSimplify, bool>(A, getIRPosition(), *this,
+                                                      Dummy, VisitValueCB))
       if (!askSimplifiedValueForAAValueConstantRange(A))
         return indicatePessimisticFixpoint();