Implement function notes as function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56716 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp
index 15eaa78..fbfe297 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->isDeclaration() && F->hasNote(Attribute::OptimizeForSize))
+ if (!F->isDeclaration() && F->hasFnAttr(Attribute::OptimizeForSize))
return false;
// Check to see if it would be profitable to unswitch current loop.