inline bool hasIndices() const {
return getNumOperands() > 1;
}
+
+ /// hasAllZeroIndices - Return true if all of the indices of this GEP are
+ /// zeros. If so, the result pointer and the first operand have the same
+ /// value, just potentially different types.
+ bool hasAllZeroIndices() const;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const GetElementPtrInst *) { return true; }
SubclassData = (SubclassData & 1) | (CC << 1);
}
- /// Obtains a constant pointer to the ParamAttrsList object which holds the
- /// parameter attributes information, if any.
+ /// Obtains a pointer to the ParamAttrsList object which holds the
+ /// parameter attributes information, if any.
+ /// @returns 0 if no attributes have been set.
/// @brief Get the parameter attributes.
- const ParamAttrsList *getParamAttrs() const { return ParamAttrs; }
+ ParamAttrsList *getParamAttrs() const { return ParamAttrs; }
/// Sets the parameter attributes for this CallInst. To construct a
/// ParamAttrsList, see ParameterAttributes.h
/// calling convention of the call.
///
class InvokeInst : public TerminatorInst {
+ ParamAttrsList *ParamAttrs;
InvokeInst(const InvokeInst &BI);
void init(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
Value* const *Args, unsigned NumArgs);
SubclassData = CC;
}
+ /// Obtains a pointer to the ParamAttrsList object which holds the
+ /// parameter attributes information, if any.
+ /// @returns 0 if no attributes have been set.
+ /// @brief Get the parameter attributes.
+ ParamAttrsList *getParamAttrs() const { return ParamAttrs; }
+
+ /// Sets the parameter attributes for this InvokeInst. To construct a
+ /// ParamAttrsList, see ParameterAttributes.h
+ /// @brief Set the parameter attributes.
+ void setParamAttrs(ParamAttrsList *attrs) { ParamAttrs = attrs; }
+
/// getCalledFunction - Return the function called, or null if this is an
/// indirect function invocation.
///