aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-23 23:52:03 +0000
committerDevang Patel <dpatel@apple.com>2008-09-23 23:52:03 +0000
commitdd4924c564c7a661b78b604ebf16dfef7aa62b35 (patch)
tree91399d16f221cab6db12715eb6e52dc27f7e37c8 /include
parent06117b65984487169cfd80c8349baf603d1879d5 (diff)
downloadexternal_llvm-dd4924c564c7a661b78b604ebf16dfef7aa62b35.tar.gz
external_llvm-dd4924c564c7a661b78b604ebf16dfef7aa62b35.tar.bz2
external_llvm-dd4924c564c7a661b78b604ebf16dfef7aa62b35.zip
Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.
Do not check isDeclaration() in hasNote(). It is clients' responsibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Attributes.h13
-rw-r--r--include/llvm/Function.h2
2 files changed, 7 insertions, 8 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h
index fbedb72381..a503354567 100644
--- a/include/llvm/Attributes.h
+++ b/include/llvm/Attributes.h
@@ -46,13 +46,6 @@ const Attributes ReadOnly = 1<<10; ///< Function only reads from memory
const Attributes Alignment = 0xffff<<16; ///< Alignment of parameter (16 bits)
// 0 = unknown, else in clear (not log)
-/// Function notes are implemented as attributes stored at index ~0 in
-/// parameter attribute list.
-const Attributes FN_NOTE_None = 0;
-const Attributes FN_NOTE_NoInline = 1<<0; // inline=never
-const Attributes FN_NOTE_AlwaysInline = 1<<1; // inline=always
-const Attributes FN_NOTE_OptimizeForSize = 1<<2; // opt_size
-
/// @brief Attributes that only apply to function parameters.
const Attributes ParameterOnly = ByVal | Nest | StructRet;
@@ -85,6 +78,12 @@ inline Attributes constructAlignmentFromInt(unsigned i) {
std::string getAsString(Attributes Attrs);
} // end namespace ParamAttr
+/// Function notes are implemented as attributes stored at index ~0 in
+/// parameter attribute list.
+const Attributes FN_NOTE_None = 0;
+const Attributes FN_NOTE_NoInline = 1<<0; // inline=never
+const Attributes FN_NOTE_AlwaysInline = 1<<1; // inline=always
+const Attributes FN_NOTE_OptimizeForSize = 1<<2; // opt_size
/// This is just a pair of values to associate a set of parameter attributes
/// with a parameter index.
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index b800909423..7a39f92282 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -152,7 +152,7 @@ public:
/// hasNote - Return true if this function has given note.
bool hasNote(Attributes N) const {
// Notes are stored at ~0 index in parameter attribute list
- return (!isDeclaration() && paramHasAttr(~0, N));
+ return (paramHasAttr(~0, N));
}
/// setNotes - Set notes for this function