diff options
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r-- | include/llvm/Function.h | 5 |
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;} |