Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.
Do not check isDeclaration() in hasNote(). It is clients' responsibility.
llvm-svn: 56524
diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
index 178bf78..4fd3d03 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/llvm/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->hasNote(ParamAttr::FN_NOTE_OptimizeForSize))
+ if (!F->isDeclaration() && F->hasNote(FN_NOTE_OptimizeForSize))
return false;
// Check to see if it would be profitable to unswitch current loop.