Remove operator cast method in favor of querying with the correct method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165899 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp
index aa4b6b4..6023ad1 100644
--- a/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1131,7 +1131,8 @@
     }
 
     // Add any parameter attributes.
-    if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1))
+    Attributes PAttrs = CallerPAL.getParamAttributes(i + 1);
+    if (PAttrs.hasAttributes())
       attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
   }
 
@@ -1159,13 +1160,15 @@
         }
 
         // Add any parameter attributes.
-        if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1))
+        Attributes PAttrs = CallerPAL.getParamAttributes(i + 1);
+        if (PAttrs.hasAttributes())
           attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs));
       }
     }
   }
 
-  if (Attributes FnAttrs =  CallerPAL.getFnAttributes())
+  Attributes FnAttrs = CallerPAL.getFnAttributes();
+  if (FnAttrs.hasAttributes())
     attrVec.push_back(AttributeWithIndex::get(~0, FnAttrs));
 
   if (NewRetTy->isVoidTy())
@@ -1274,7 +1277,8 @@
       // mean appending it.  Likewise for attributes.
 
       // Add any result attributes.
-      if (Attributes Attr = Attrs.getRetAttributes())
+      Attributes Attr = Attrs.getRetAttributes();
+      if (Attr.hasAttributes())
         NewAttrs.push_back(AttributeWithIndex::get(0, Attr));
 
       {
@@ -1295,7 +1299,8 @@
 
           // Add the original argument and attributes.
           NewArgs.push_back(*I);
-          if (Attributes Attr = Attrs.getParamAttributes(Idx))
+          Attr = Attrs.getParamAttributes(Idx);
+          if (Attr.hasAttributes())
             NewAttrs.push_back
               (AttributeWithIndex::get(Idx + (Idx >= NestIdx), Attr));
 
@@ -1304,7 +1309,8 @@
       }
 
       // Add any function attributes.
-      if (Attributes Attr = Attrs.getFnAttributes())
+      Attr = Attrs.getFnAttributes();
+      if (Attr.hasAttributes())
         NewAttrs.push_back(AttributeWithIndex::get(~0, Attr));
 
       // The trampoline may have been bitcast to a bogus type (FTy).