diff options
author | Duncan Sands <baldrick@free.fr> | 2008-01-13 21:19:12 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-01-13 21:19:12 +0000 |
commit | 2796740ad6718a06c0f4317c9d0abf981c94fbaa (patch) | |
tree | 90fae28da52252254e8a3bba93cec952332d67f5 /llvm/lib/VMCore/ParameterAttributes.cpp | |
parent | 5bc253c8f2a8338f71b09462109859d7aae99029 (diff) | |
download | bcm5719-llvm-2796740ad6718a06c0f4317c9d0abf981c94fbaa.tar.gz bcm5719-llvm-2796740ad6718a06c0f4317c9d0abf981c94fbaa.zip |
Allow the byval attribute for pointers to any type with
a size, not just structs.
llvm-svn: 45938
Diffstat (limited to 'llvm/lib/VMCore/ParameterAttributes.cpp')
-rw-r--r-- | llvm/lib/VMCore/ParameterAttributes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/ParameterAttributes.cpp b/llvm/lib/VMCore/ParameterAttributes.cpp index 77a2a6e7fe3..b48e0cecde3 100644 --- a/llvm/lib/VMCore/ParameterAttributes.cpp +++ b/llvm/lib/VMCore/ParameterAttributes.cpp @@ -194,8 +194,8 @@ uint16_t ParamAttr::typeIncompatible (const Type *Ty) { 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. |