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
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp
index 1c4bba2..aa9158e 100644
--- a/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -430,7 +430,7 @@
Function *F = loopHeader->getParent();
// Do not unswitch if the function is optimized for size.
- if (F->getNotes() & FN_NOTE_OptimizeForSize)
+ if (F->hasNote(FN_NOTE_OptimizeForSize))
return false;
// Check to see if it would be profitable to unswitch current loop.