diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-09 15:01:12 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-09 15:01:12 +0000 |
commit | 4746ecf16eeb5ff920672fdff1c0dd85594437ed (patch) | |
tree | 3325b29641ff0704e69a93a2994446de651e4ea4 /include/llvm/Function.h | |
parent | efc366263659db05ddc5e14532946cb9213bcdd6 (diff) |
For PR1146:
* Add ParamAttrList pointers to Function and CallInst.
* Move the implementation of ParamAttrList from Type.cpp to Function.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r-- | include/llvm/Function.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 4cfb6761cc..101de8ac3c 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -26,6 +26,7 @@ namespace llvm { class FunctionType; +class ParamAttrsList; // Traits for intrusive list of instructions... template<> struct ilist_traits<BasicBlock> @@ -60,11 +61,11 @@ public: private: // Important things that make up a function! - BasicBlockListType BasicBlocks; // The basic blocks - ArgumentListType ArgumentList; // The formal arguments - - ValueSymbolTable *SymTab; - unsigned CallingConvention; + BasicBlockListType BasicBlocks; ///< The basic blocks + ArgumentListType ArgumentList; ///< The formal arguments + ValueSymbolTable *SymTab; ///< Symbol table of args/instructions + ParamAttrsList *ParamAttrs; ///< Parameter attributes + unsigned CallingConvention; ///< Calling convention to use friend class SymbolTableListTraits<Function, Module, Module>; @@ -111,6 +112,17 @@ public: unsigned getCallingConv() const { return CallingConvention; } void setCallingConv(unsigned CC) { CallingConvention = CC; } + /// Obtains a constant pointer to the ParamAttrsList object which holds the + /// parameter attributes information, if any. + /// @returns 0 if no parameter attributes have been set. + /// @brief Get the parameter attributes. + const ParamAttrsList *getParamAttrs() const { return ParamAttrs; } + + /// Sets the parameter attributes for this Function. To construct a + /// ParamAttrsList, see ParameterAttributes.h + /// @brief Set the parameter attributes. + void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; } + /// deleteBody - This method deletes the body of the function, and converts /// the linkage to external. /// |