mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Make some minor reorganizations and comment changes to eliminate trivial
differences between the CallInst and InvokeInst classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56699 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1056,16 +1056,16 @@ public:
|
|||||||
|
|
||||||
~CallInst();
|
~CallInst();
|
||||||
|
|
||||||
virtual CallInst *clone() const;
|
|
||||||
|
|
||||||
/// Provide fast operand accessors
|
|
||||||
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
|
||||||
|
|
||||||
bool isTailCall() const { return SubclassData & 1; }
|
bool isTailCall() const { return SubclassData & 1; }
|
||||||
void setTailCall(bool isTC = true) {
|
void setTailCall(bool isTC = true) {
|
||||||
SubclassData = (SubclassData & ~1) | unsigned(isTC);
|
SubclassData = (SubclassData & ~1) | unsigned(isTC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual CallInst *clone() const;
|
||||||
|
|
||||||
|
/// Provide fast operand accessors
|
||||||
|
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
|
||||||
|
|
||||||
/// getCallingConv/setCallingConv - Get or set the calling convention of this
|
/// getCallingConv/setCallingConv - Get or set the calling convention of this
|
||||||
/// function call.
|
/// function call.
|
||||||
unsigned getCallingConv() const { return SubclassData >> 1; }
|
unsigned getCallingConv() const { return SubclassData >> 1; }
|
||||||
@@ -1077,7 +1077,8 @@ public:
|
|||||||
///
|
///
|
||||||
const AttrListPtr &getAttributes() const { return AttributeList; }
|
const AttrListPtr &getAttributes() const { return AttributeList; }
|
||||||
|
|
||||||
/// setAttributes - Sets the parameter attributes for this call.
|
/// setAttributes - Set the parameter attributes for this call.
|
||||||
|
///
|
||||||
void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
|
void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
|
||||||
|
|
||||||
/// addAttribute - adds the attribute to the list of attributes.
|
/// addAttribute - adds the attribute to the list of attributes.
|
||||||
@@ -1087,7 +1088,7 @@ public:
|
|||||||
void removeAttribute(unsigned i, Attributes attr);
|
void removeAttribute(unsigned i, Attributes attr);
|
||||||
|
|
||||||
/// @brief Determine whether the call or the callee has the given attribute.
|
/// @brief Determine whether the call or the callee has the given attribute.
|
||||||
bool paramHasAttr(unsigned i, unsigned attr) const;
|
bool paramHasAttr(unsigned i, Attributes attr) const;
|
||||||
|
|
||||||
/// @brief Extract the alignment for a call or parameter (0=unknown).
|
/// @brief Extract the alignment for a call or parameter (0=unknown).
|
||||||
unsigned getParamAlignment(unsigned i) const {
|
unsigned getParamAlignment(unsigned i) const {
|
||||||
@@ -1142,9 +1143,9 @@ public:
|
|||||||
return AttributeList.hasAttrSomewhere(Attribute::ByVal);
|
return AttributeList.hasAttrSomewhere(Attribute::ByVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getCalledFunction - Return the function being called by this instruction
|
/// getCalledFunction - Return the function called, or null if this is an
|
||||||
/// if it is a direct call. If it is a call through a function pointer,
|
/// indirect function invocation.
|
||||||
/// return null.
|
///
|
||||||
Function *getCalledFunction() const {
|
Function *getCalledFunction() const {
|
||||||
return dyn_cast<Function>(getOperand(0));
|
return dyn_cast<Function>(getOperand(0));
|
||||||
}
|
}
|
||||||
@@ -2439,15 +2440,15 @@ public:
|
|||||||
///
|
///
|
||||||
void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
|
void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; }
|
||||||
|
|
||||||
/// @brief Determine whether the call or the callee has the given attribute.
|
|
||||||
bool paramHasAttr(unsigned i, Attributes attr) const;
|
|
||||||
|
|
||||||
/// addAttribute - adds the attribute to the list of attributes.
|
/// addAttribute - adds the attribute to the list of attributes.
|
||||||
void addAttribute(unsigned i, Attributes attr);
|
void addAttribute(unsigned i, Attributes attr);
|
||||||
|
|
||||||
/// removeAttribute - removes the attribute from the list of attributes.
|
/// removeAttribute - removes the attribute from the list of attributes.
|
||||||
void removeAttribute(unsigned i, Attributes attr);
|
void removeAttribute(unsigned i, Attributes attr);
|
||||||
|
|
||||||
|
/// @brief Determine whether the call or the callee has the given attribute.
|
||||||
|
bool paramHasAttr(unsigned i, Attributes attr) const;
|
||||||
|
|
||||||
/// @brief Extract the alignment for a call or parameter (0=unknown).
|
/// @brief Extract the alignment for a call or parameter (0=unknown).
|
||||||
unsigned getParamAlignment(unsigned i) const {
|
unsigned getParamAlignment(unsigned i) const {
|
||||||
return AttributeList.getParamAlignment(i);
|
return AttributeList.getParamAlignment(i);
|
||||||
@@ -2496,6 +2497,11 @@ public:
|
|||||||
return paramHasAttr(1, Attribute::StructRet);
|
return paramHasAttr(1, Attribute::StructRet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// @brief Determine if any call argument is an aggregate passed by value.
|
||||||
|
bool hasByValArgument() const {
|
||||||
|
return AttributeList.hasAttrSomewhere(Attribute::ByVal);
|
||||||
|
}
|
||||||
|
|
||||||
/// getCalledFunction - Return the function called, or null if this is an
|
/// getCalledFunction - Return the function called, or null if this is an
|
||||||
/// indirect function invocation.
|
/// indirect function invocation.
|
||||||
///
|
///
|
||||||
@@ -2503,8 +2509,10 @@ public:
|
|||||||
return dyn_cast<Function>(getOperand(0));
|
return dyn_cast<Function>(getOperand(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// getCalledValue - Get a pointer to a function that is invoked by this inst.
|
/// getCalledValue - Get a pointer to the function that is invoked by this
|
||||||
Value *getCalledValue() const { return getOperand(0); }
|
/// instruction
|
||||||
|
const Value *getCalledValue() const { return getOperand(0); }
|
||||||
|
Value *getCalledValue() { return getOperand(0); }
|
||||||
|
|
||||||
// get*Dest - Return the destination basic blocks...
|
// get*Dest - Return the destination basic blocks...
|
||||||
BasicBlock *getNormalDest() const {
|
BasicBlock *getNormalDest() const {
|
||||||
|
Reference in New Issue
Block a user