diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-18 23:16:42 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-18 23:16:42 +0000 |
commit | 5b0a8d9ca6602ba22d20a5ed7cbf50e5f5f2b369 (patch) | |
tree | 36bb0b247ebd9393b495644367e15791ad4e9995 | |
parent | 9d7c53af30363038a0acb594201cdb1282510f7b (diff) | |
download | external_llvm-5b0a8d9ca6602ba22d20a5ed7cbf50e5f5f2b369.zip external_llvm-5b0a8d9ca6602ba22d20a5ed7cbf50e5f5f2b369.tar.gz external_llvm-5b0a8d9ca6602ba22d20a5ed7cbf50e5f5f2b369.tar.bz2 |
Add some convenience methods for querying function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175469 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/IR/Function.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h index f7d5a48..568b55c 100644 --- a/include/llvm/IR/Function.h +++ b/include/llvm/IR/Function.h @@ -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; |