aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Function.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-22 22:32:29 +0000
committerDevang Patel <dpatel@apple.com>2008-09-22 22:32:29 +0000
commitf3ba70861ccf00b1072ae1b6ade3ebe2da6cff40 (patch)
tree5e1aeee0c7c60ca44ec90d45c700e24a14aa2b89 /include/llvm/Function.h
parentef901c57563eb841ac86648d533272776706cb64 (diff)
Add hasNote() to check note associated with a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r--include/llvm/Function.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index d47746d161..3aef7c5da9 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -159,6 +159,11 @@ public:
///
const FunctionNotes &getNotes() const { return Notes; }
+ /// hasNote - Return true if this function has given note.
+ bool hasNote(FunctionNotes N) const {
+ return (!isDeclaration() && (Notes & N));
+ }
+
/// setNotes - Set notes for this function
///
void setNotes(const FunctionNotes P) { Notes = Notes | P;}