Add hasNote() to check note associated with a function.

llvm-svn: 56477
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp
index 8bc2563..6fb695d 100644
--- a/llvm/lib/Transforms/IPO/InlineSimple.cpp
+++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp
@@ -65,7 +65,7 @@
   
   for (Module::iterator I = M.begin(), E = M.end();
        I != E; ++I)
-    if (!I->isDeclaration() && (I->getNotes() & FN_NOTE_NoInline))
+    if (I->hasNote(FN_NOTE_NoInline))
       NeverInline.insert(I);
 
   // Get llvm.noinline