[llvm-commits] [llvm] r170517 - in /llvm/trunk: include/llvm/Attributes.h lib/VMCore/Verifier.cpp
Bill Wendling
isanbard at gmail.com
Wed Dec 19 01:04:59 PST 2012
Author: void
Date: Wed Dec 19 03:04:58 2012
New Revision: 170517
URL: http://llvm.org/viewvc/llvm-project?rev=170517&view=rev
Log:
Inline the only use of the hasParameterOnlyAttrs method.
Modified:
llvm/trunk/include/llvm/Attributes.h
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=170517&r1=170516&r2=170517&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Wed Dec 19 03:04:58 2012
@@ -117,14 +117,6 @@
/// alignment value.
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
/// be used on return values or function parameters.
bool hasFunctionOnlyAttrs() const {
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=170517&r1=170516&r2=170517&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Wed Dec 19 03:04:58 2012
@@ -534,7 +534,10 @@
"' only apply to functions!", V);
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' "
"do not apply to return values!", V);
More information about the llvm-commits
mailing list