mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-30 04:35:00 +00:00
Inline the only use of the hasParameterOnlyAttrs method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170517 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d3dcfe424
commit
5d122b6ec0
@ -117,14 +117,6 @@ public:
|
|||||||
/// alignment value.
|
/// alignment value.
|
||||||
unsigned getStackAlignment() const;
|
unsigned getStackAlignment() const;
|
||||||
|
|
||||||
/// \brief Attribute that only apply to function parameters.
|
|
||||||
bool hasParameterOnlyAttrs() const {
|
|
||||||
return hasAttribute(Attribute::ByVal) ||
|
|
||||||
hasAttribute(Attribute::Nest) ||
|
|
||||||
hasAttribute(Attribute::StructRet) ||
|
|
||||||
hasAttribute(Attribute::NoCapture);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Attribute that may be applied to the function itself. These cannot
|
/// \brief Attribute that may be applied to the function itself. These cannot
|
||||||
/// be used on return values or function parameters.
|
/// be used on return values or function parameters.
|
||||||
bool hasFunctionOnlyAttrs() const {
|
bool hasFunctionOnlyAttrs() const {
|
||||||
|
@ -534,7 +534,10 @@ void Verifier::VerifyParameterAttrs(Attribute Attrs, Type *Ty,
|
|||||||
"' only apply to functions!", V);
|
"' only apply to functions!", V);
|
||||||
|
|
||||||
if (isReturnValue)
|
if (isReturnValue)
|
||||||
Assert1(!Attrs.hasParameterOnlyAttrs(),
|
Assert1(!Attrs.hasAttribute(Attribute::ByVal) &&
|
||||||
|
!Attrs.hasAttribute(Attribute::Nest) &&
|
||||||
|
!Attrs.hasAttribute(Attribute::StructRet) &&
|
||||||
|
!Attrs.hasAttribute(Attribute::NoCapture),
|
||||||
"Attribute 'byval', 'nest', 'sret', and 'nocapture' "
|
"Attribute 'byval', 'nest', 'sret', and 'nocapture' "
|
||||||
"do not apply to return values!", V);
|
"do not apply to return values!", V);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user