Allow the byval attribute for pointers to any type with
a size, not just structs.

llvm-svn: 45938
diff --git a/llvm/lib/VMCore/ParameterAttributes.cpp b/llvm/lib/VMCore/ParameterAttributes.cpp
index 77a2a6e..b48e0ce 100644
--- a/llvm/lib/VMCore/ParameterAttributes.cpp
+++ b/llvm/lib/VMCore/ParameterAttributes.cpp
@@ -194,8 +194,8 @@
     Incompatible |= SExt | ZExt;
 
   if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
-    if (!isa<StructType>(PTy->getElementType()))
-      // Attributes that only apply to pointers to structs.
+    if (!PTy->getElementType()->isSized())
+      // The byval attribute only applies to pointers to types with a size.
       Incompatible |= ParamAttr::ByVal;
   } else {
     // Attributes that only apply to pointers.