aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Function.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-02 18:33:55 +0000
committerDevang Patel <dpatel@apple.com>2008-09-02 18:33:55 +0000
commit21dbb99964f0568d2d3d3fc7e2bd5967e7577bd1 (patch)
treef8c191cdf0726c41b11382382369760da8934e5f /include/llvm/Function.h
parentecfe67c21799891f27597455ed84c70de7769f36 (diff)
Getter and setter for function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r--include/llvm/Function.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 0e852e6ba1..58edab480a 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -51,6 +51,12 @@ template<> struct ilist_traits<Argument>
static int getListOffset();
};
+typedef unsigned FunctionNotes;
+const FunctionNotes FP_None = 0;
+const FunctionNotes FP_NoInline = 1<<0;
+const FunctionNotes FP_AlwaysInline = 1<<1;
+const FunctionNotes FP_OptimizeForSize = 1<<2;
+
class Function : public GlobalValue, public Annotable,
public ilist_node<Function> {
public:
@@ -70,7 +76,8 @@ private:
mutable ArgumentListType ArgumentList; ///< The formal arguments
ValueSymbolTable *SymTab; ///< Symbol table of args/instructions
PAListPtr ParamAttrs; ///< Parameter attributes
-
+ FunctionNotes Notes; ///< Function properties
+
// The Calling Convention is stored in Value::SubclassData.
/*unsigned CallingConvention;*/
@@ -148,6 +155,14 @@ public:
///
void setParamAttrs(const PAListPtr &attrs) { ParamAttrs = attrs; }
+ /// getNotes - Return this function properties
+ ///
+ const FunctionNotes &getNotes() const { return Notes; }
+
+ /// setNotes - Set properties for this function
+ ///
+ void setNotes(const FunctionNotes P) { Notes = P;}
+
/// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
/// to use during code generation.
bool hasGC() const;