Changes in directory llvm/include/llvm:
Function.h updated: 1.72 -> 1.73 Instructions.h updated: 1.63 -> 1.64 --- Log message: For PR1146: http://llvm.org/PR1146 : * Add ParamAttrList pointers to Function and CallInst. * Move the implementation of ParamAttrList from Type.cpp to Function.cpp --- Diffs of the changes: (+29 -5) Function.h | 22 +++++++++++++++++----- Instructions.h | 12 ++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.72 llvm/include/llvm/Function.h:1.73 --- llvm/include/llvm/Function.h:1.72 Mon Feb 5 14:47:19 2007 +++ llvm/include/llvm/Function.h Mon Apr 9 10:01:12 2007 @@ -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 @@ 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 @@ 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. /// Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.63 llvm/include/llvm/Instructions.h:1.64 --- llvm/include/llvm/Instructions.h:1.63 Wed Feb 28 16:00:54 2007 +++ llvm/include/llvm/Instructions.h Mon Apr 9 10:01:12 2007 @@ -26,6 +26,7 @@ class VectorType; class ConstantRange; class APInt; +class ParamAttrsList; //===----------------------------------------------------------------------===// // AllocationInst Class @@ -694,6 +695,7 @@ /// hold the calling convention of the call. /// class CallInst : public Instruction { + ParamAttrsList *ParamAttrs; ///< parameter attributes for call CallInst(const CallInst &CI); void init(Value *Func, Value* const *Params, unsigned NumParams); void init(Value *Func, Value *Actual1, Value *Actual2); @@ -735,6 +737,16 @@ SubclassData = (SubclassData & 1) | (CC << 1); } + /// Obtains a constant pointer to the ParamAttrsList object which holds the + /// parameter attributes information, if any. + /// @brief Get the parameter attributes. + const ParamAttrsList *getParamAttrs() const { return ParamAttrs; } + + /// Sets the parameter attributes for this CallInst. To construct a + /// ParamAttrsList, see ParameterAttributes.h + /// @brief Set the parameter attributes. + void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; } + /// getCalledFunction - Return the function being called by this instruction /// if it is a direct call. If it is a call through a function pointer, /// return null. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits