mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Allow the byval attribute for pointers to any type with
a size, not just structs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45938 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ee2b7a4530
commit
421d1c93cc
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user