Use isSingleValueType instead of isFirstClassType to
exclude struct and array types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51459 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index e874ec4..a6bef18 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -154,10 +154,10 @@
                << PtrArg->getName() << "' because it would require adding more "
                << "than " << maxElements << " arguments to the function.\n";
         } else {
-          // If all the elements are first class types, we can promote it.
+          // If all the elements are single-value types, we can promote it.
           bool AllSimple = true;
           for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i)
-            if (!STy->getElementType(i)->isFirstClassType()) {
+            if (!STy->getElementType(i)->isSingleValueType()) {
               AllSimple = false;
               break;
             }