Don't use isa when we can reuse a previous dyn_cast.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 15 Jul 2008 13:39:08 +0000 (13:39 +0000)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 15 Jul 2008 13:39:08 +0000 (13:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53607 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/DeadArgumentElimination.cpp

index 40012d1ad7b44c4175ef746065054510834a586c..34e73295d770f71d1af013906e7475971936e4c7 100644 (file)
@@ -794,9 +794,8 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
         // Replace by null for now.
         Call->replaceAllUsesWith(Constant::getNullValue(Call->getType()));
       } else {
-        assert(isa<StructType>(RetTy) && "Return type changed, but not into a"
-                                         "void. The old return type must have"
-                                         "been a struct!");
+        assert(STy && "Return type changed, but not into a void. The old "
+                      "return type must have been a struct!");
         // The original return value was a struct, update all uses (which are
         // all extractvalue instructions, or uses that are unused themselves).
         for (Value::use_iterator I = Call->use_begin(), E = Call->use_end();