1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00

Add some convenience methods for querying function attributes.

llvm-svn: 175469
This commit is contained in:
Bill Wendling 2013-02-18 23:16:42 +00:00
parent fd77684daa
commit 1dc814742d

View File

@ -175,6 +175,14 @@ public:
AttributeSet::FunctionIndex, N));
}
/// \brief Return true if the function has the attribute.
bool hasFnAttribute(Attribute::AttrKind Kind) const {
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex, Kind);
}
bool hasFnAttribute(StringRef Kind) const {
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex, Kind);
}
/// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
/// to use during code generation.
bool hasGC() const;