mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Allow the byval attribute for pointers to any type with
a size, not just structs. llvm-svn: 45938
This commit is contained in:
parent
32eae5daa5
commit
86c17f2ebf
@ -194,8 +194,8 @@ uint16_t ParamAttr::typeIncompatible (const Type *Ty) {
|
|||||||
Incompatible |= SExt | ZExt;
|
Incompatible |= SExt | ZExt;
|
||||||
|
|
||||||
if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
|
if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
|
||||||
if (!isa<StructType>(PTy->getElementType()))
|
if (!PTy->getElementType()->isSized())
|
||||||
// Attributes that only apply to pointers to structs.
|
// The byval attribute only applies to pointers to types with a size.
|
||||||
Incompatible |= ParamAttr::ByVal;
|
Incompatible |= ParamAttr::ByVal;
|
||||||
} else {
|
} else {
|
||||||
// Attributes that only apply to pointers.
|
// Attributes that only apply to pointers.
|
||||||
|
Loading…
Reference in New Issue
Block a user