mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 07:21:56 +00:00
Getter and setter for function notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55638 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ecfe67c217
commit
21dbb99964
@ -51,6 +51,12 @@ template<> struct ilist_traits<Argument>
|
|||||||
static int getListOffset();
|
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,
|
class Function : public GlobalValue, public Annotable,
|
||||||
public ilist_node<Function> {
|
public ilist_node<Function> {
|
||||||
public:
|
public:
|
||||||
@ -70,6 +76,7 @@ private:
|
|||||||
mutable ArgumentListType ArgumentList; ///< The formal arguments
|
mutable ArgumentListType ArgumentList; ///< The formal arguments
|
||||||
ValueSymbolTable *SymTab; ///< Symbol table of args/instructions
|
ValueSymbolTable *SymTab; ///< Symbol table of args/instructions
|
||||||
PAListPtr ParamAttrs; ///< Parameter attributes
|
PAListPtr ParamAttrs; ///< Parameter attributes
|
||||||
|
FunctionNotes Notes; ///< Function properties
|
||||||
|
|
||||||
// The Calling Convention is stored in Value::SubclassData.
|
// The Calling Convention is stored in Value::SubclassData.
|
||||||
/*unsigned CallingConvention;*/
|
/*unsigned CallingConvention;*/
|
||||||
@ -148,6 +155,14 @@ public:
|
|||||||
///
|
///
|
||||||
void setParamAttrs(const PAListPtr &attrs) { ParamAttrs = attrs; }
|
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
|
/// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm
|
||||||
/// to use during code generation.
|
/// to use during code generation.
|
||||||
bool hasGC() const;
|
bool hasGC() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user