- /// renameLocalSymbols - This method goes through the Function's symbol table
- /// and renames any symbols that conflict with symbols at global scope. This
- /// is required before printing out to a textual form, to ensure that there is
- /// no ambiguity when parsing.
- void renameLocalSymbols();
+ /// getCallingConv()/setCallingConv(uint) - These method get and set the
+ /// calling convention of this function. The enum values for the known
+ /// calling conventions are defined in CallingConv.h.
+ unsigned getCallingConv() const { return SubclassData >> 1; }
+ void setCallingConv(unsigned CC) {
+ SubclassData = (SubclassData & 1) | (CC << 1);
+ }
+
+ /// 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(const ParamAttrsList *attrs);
+
+ /// hasCollector/getCollector/setCollector/clearCollector - The name of the
+ /// garbage collection algorithm to use during code generation.
+ bool hasCollector() const;
+ const char *getCollector() const;
+ void setCollector(const char *Str);
+ void clearCollector();
+
+ /// @brief Determine whether the function has the given attribute.
+ bool paramHasAttr(uint16_t i, ParameterAttributes attr) const {
+ return ParamAttrs && ParamAttrs->paramHasAttr(i, attr);
+ }