mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Consistent use of the noduplicate attribute.
The "noduplicate" attribute of call instructions is sometimes queried directly and sometimes through the cannotDuplicate() predicate. This patch streamlines all queries to use the cannotDuplicate() predicate. It also adds this predicate to InvokeInst, to mirror what CallInst has. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204049 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3026,6 +3026,12 @@ public:
|
||||
addAttribute(AttributeSet::FunctionIndex, Attribute::NoUnwind);
|
||||
}
|
||||
|
||||
/// \brief Determine if the invoke cannot be duplicated.
|
||||
bool cannotDuplicate() const {return hasFnAttr(Attribute::NoDuplicate); }
|
||||
void setCannotDuplicate() {
|
||||
addAttribute(AttributeSet::FunctionIndex, Attribute::NoDuplicate);
|
||||
}
|
||||
|
||||
/// \brief Determine if the call returns a structure through first
|
||||
/// pointer argument.
|
||||
bool hasStructRetAttr() const {
|
||||
|
Reference in New Issue
Block a user