1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Remove inline keyword from inline classof methods

The style guide states that the explicit `inline`
should not be used with inline methods.  classof is
very common inline method with a fair amount on
inconsistency:

$ git grep classof ./include | grep inline | wc -l
230
$ git grep classof ./include | grep -v inline | wc -l
257

I chose to target this method rather the larger change
since this method is easily cargo-culted (I did it at
least once).  I considered doing the larger change and
removing all occurrences but that would be a much larger
change.

Differential Revision: https://reviews.llvm.org/D33906

llvm-svn: 306731
This commit is contained in:
Sam Clegg 2017-06-29 19:35:17 +00:00
parent 7db4634bdb
commit d68f13d3d6
38 changed files with 292 additions and 294 deletions

View File

@ -139,7 +139,7 @@ public:
// Methods for support type inquiry through isa, cast, and
// dyn_cast
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
unsigned ID = V->getValueID();
return ID == MemoryUseVal || ID == MemoryPhiVal || ID == MemoryDefVal;
}
@ -241,7 +241,7 @@ public:
/// \brief Get the access that produces the memory state used by this Use.
MemoryAccess *getDefiningAccess() const { return getOperand(0); }
static inline bool classof(const Value *MA) {
static bool classof(const Value *MA) {
return MA->getValueID() == MemoryUseVal || MA->getValueID() == MemoryDefVal;
}
@ -297,7 +297,7 @@ public:
// allocate space for exactly one operand
void *operator new(size_t s) { return User::operator new(s, 1); }
static inline bool classof(const Value *MA) {
static bool classof(const Value *MA) {
return MA->getValueID() == MemoryUseVal;
}
@ -353,7 +353,7 @@ public:
// allocate space for exactly one operand
void *operator new(size_t s) { return User::operator new(s, 1); }
static inline bool classof(const Value *MA) {
static bool classof(const Value *MA) {
return MA->getValueID() == MemoryDefVal;
}
@ -526,7 +526,7 @@ public:
return getIncomingValue(Idx);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == MemoryPhiVal;
}

View File

@ -262,7 +262,7 @@ public:
const SCEVConstant *getRHS() const { return RHS; }
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEVPredicate *P) {
static bool classof(const SCEVPredicate *P) {
return P->getKind() == P_Equal;
}
};
@ -360,7 +360,7 @@ public:
bool isAlwaysTrue() const override;
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEVPredicate *P) {
static bool classof(const SCEVPredicate *P) {
return P->getKind() == P_Wrap;
}
};
@ -406,7 +406,7 @@ public:
unsigned getComplexity() const override { return Preds.size(); }
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEVPredicate *P) {
static bool classof(const SCEVPredicate *P) {
return P->getKind() == P_Union;
}
};

View File

@ -46,7 +46,7 @@ namespace llvm {
Type *getType() const { return V->getType(); }
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scConstant;
}
};
@ -65,7 +65,7 @@ namespace llvm {
Type *getType() const { return Ty; }
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scTruncate ||
S->getSCEVType() == scZeroExtend ||
S->getSCEVType() == scSignExtend;
@ -82,7 +82,7 @@ namespace llvm {
public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scTruncate;
}
};
@ -97,7 +97,7 @@ namespace llvm {
public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scZeroExtend;
}
};
@ -112,7 +112,7 @@ namespace llvm {
public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scSignExtend;
}
};
@ -167,7 +167,7 @@ namespace llvm {
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scAddExpr ||
S->getSCEVType() == scMulExpr ||
S->getSCEVType() == scSMaxExpr ||
@ -185,7 +185,7 @@ namespace llvm {
public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scAddExpr ||
S->getSCEVType() == scMulExpr ||
S->getSCEVType() == scSMaxExpr ||
@ -217,7 +217,7 @@ namespace llvm {
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scAddExpr;
}
};
@ -234,7 +234,7 @@ namespace llvm {
public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scMulExpr;
}
};
@ -263,7 +263,7 @@ namespace llvm {
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scUDivExpr;
}
};
@ -345,7 +345,7 @@ namespace llvm {
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scAddRecExpr;
}
};
@ -363,7 +363,7 @@ namespace llvm {
public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scSMaxExpr;
}
};
@ -382,7 +382,7 @@ namespace llvm {
public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scUMaxExpr;
}
};
@ -428,7 +428,7 @@ namespace llvm {
Type *getType() const { return getValPtr()->getType(); }
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const SCEV *S) {
static bool classof(const SCEV *S) {
return S->getSCEVType() == scUnknown;
}
};

View File

@ -94,7 +94,7 @@ public:
explicit FixedStackPseudoSourceValue(int FI)
: PseudoSourceValue(FixedStack), FI(FI) {}
static inline bool classof(const PseudoSourceValue *V) {
static bool classof(const PseudoSourceValue *V) {
return V->kind() == FixedStack;
}
@ -126,7 +126,7 @@ class GlobalValuePseudoSourceValue : public CallEntryPseudoSourceValue {
public:
GlobalValuePseudoSourceValue(const GlobalValue *GV);
static inline bool classof(const PseudoSourceValue *V) {
static bool classof(const PseudoSourceValue *V) {
return V->kind() == GlobalValueCallEntry;
}
@ -140,7 +140,7 @@ class ExternalSymbolPseudoSourceValue : public CallEntryPseudoSourceValue {
public:
ExternalSymbolPseudoSourceValue(const char *ES);
static inline bool classof(const PseudoSourceValue *V) {
static bool classof(const PseudoSourceValue *V) {
return V->kind() == ExternalSymbolCallEntry;
}

View File

@ -1743,7 +1743,7 @@ public:
bool isConstant() const;
static inline bool classof(const SDNode *N) {
static bool classof(const SDNode *N) {
return N->getOpcode() == ISD::BUILD_VECTOR;
}
};

View File

@ -120,7 +120,7 @@ public:
bool hasAttribute(Attribute::AttrKind Kind) const;
/// Method for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == ArgumentVal;
}
};

View File

@ -326,7 +326,7 @@ public:
ValueSymbolTable *getValueSymbolTable();
/// \brief Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::BasicBlockVal;
}

View File

@ -116,7 +116,7 @@ public:
void destroyConstant();
//// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() >= ConstantFirstVal &&
V->getValueID() <= ConstantLastVal;
}

View File

@ -842,7 +842,7 @@ public:
BasicBlock *getBasicBlock() const { return (BasicBlock*)Op<1>().get(); }
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == BlockAddressVal;
}
};
@ -1217,7 +1217,7 @@ public:
Instruction *getAsInstruction();
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == ConstantExprVal;
}

View File

@ -89,7 +89,7 @@ public:
bool isPowerOf2ByteWidth() const;
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == IntegerTyID;
}
};
@ -139,7 +139,7 @@ public:
unsigned getNumParams() const { return NumContainedTys - 1; }
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == FunctionTyID;
}
};
@ -171,7 +171,7 @@ public:
bool indexValid(unsigned Idx) const;
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == ArrayTyID ||
T->getTypeID() == StructTyID ||
T->getTypeID() == VectorTyID;
@ -317,7 +317,7 @@ public:
}
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == StructTyID;
}
};
@ -360,7 +360,7 @@ public:
Type *getElementType() const { return ContainedType; }
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == ArrayTyID || T->getTypeID() == VectorTyID;
}
};
@ -380,7 +380,7 @@ public:
static bool isValidElementType(Type *ElemTy);
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == ArrayTyID;
}
};
@ -454,7 +454,7 @@ public:
}
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == VectorTyID;
}
};
@ -495,7 +495,7 @@ public:
inline unsigned getAddressSpace() const { return getSubclassData(); }
/// Implement support type inquiry through isa, cast, and dyn_cast.
static inline bool classof(const Type *T) {
static bool classof(const Type *T) {
return T->getTypeID() == PointerTyID;
}
};

View File

@ -671,7 +671,7 @@ public:
void viewCFGOnly() const;
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::FunctionVal;
}

View File

@ -88,7 +88,7 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::GlobalAliasVal;
}
};

View File

@ -70,7 +70,7 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::GlobalIFuncVal;
}
};

View File

@ -75,7 +75,7 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::GlobalAliasVal ||
V->getValueID() == Value::GlobalIFuncVal;
}

View File

@ -155,7 +155,7 @@ protected:
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::FunctionVal ||
V->getValueID() == Value::GlobalVariableVal;
}

View File

@ -241,7 +241,7 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::GlobalVariableVal;
}
};

View File

@ -183,7 +183,7 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() == Value::InlineAsmVal;
}

View File

@ -73,10 +73,10 @@ public:
void setSuccessor(unsigned idx, BasicBlock *B);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->isTerminator();
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -298,14 +298,14 @@ public:
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Alloca ||
I->getOpcode() == Instruction::Load ||
I->getOpcode() == Instruction::VAArg ||
I->getOpcode() == Instruction::ExtractValue ||
(I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -532,10 +532,10 @@ public:
bool swapOperands();
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->isBinaryOp();
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -833,10 +833,10 @@ public:
static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy);
/// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->isCast();
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -1062,11 +1062,11 @@ public:
static bool isImpliedFalseByMatchingCmp(Predicate Pred1, Predicate Pred2);
/// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::ICmp ||
I->getOpcode() == Instruction::FCmp;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -1152,8 +1152,8 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) { return I->isFuncletPad(); }
static inline bool classof(const Value *V) {
static bool classof(const Instruction *I) { return I->isFuncletPad(); }
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};

View File

@ -556,7 +556,7 @@ public:
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return V->getValueID() >= Value::InstructionVal;
}

View File

@ -145,10 +145,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return (I->getOpcode() == Instruction::Alloca);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -284,10 +284,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Load;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -408,10 +408,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Store;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -483,10 +483,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Fence;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -639,10 +639,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::AtomicCmpXchg;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -788,10 +788,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::AtomicRMW;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -1048,10 +1048,10 @@ public:
bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return (I->getOpcode() == Instruction::GetElementPtr);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -1226,10 +1226,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::ICmp;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -1334,10 +1334,10 @@ public:
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::FCmp;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -1873,10 +1873,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Call;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -2011,10 +2011,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Select;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2057,10 +2057,10 @@ public:
static unsigned getPointerOperandIndex() { return 0U; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == VAArg;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2114,10 +2114,10 @@ public:
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::ExtractElement;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2177,10 +2177,10 @@ public:
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::InsertElement;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2276,10 +2276,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::ShuffleVector;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2376,10 +2376,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::ExtractValue;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2507,10 +2507,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::InsertValue;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2747,10 +2747,10 @@ public:
bool hasConstantOrUndefValue() const;
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::PHI;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -2856,10 +2856,10 @@ public:
void reserveClauses(unsigned Size) { growOperands(Size); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::LandingPad;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -2930,10 +2930,10 @@ public:
unsigned getNumSuccessors() const { return 0; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return (I->getOpcode() == Instruction::Ret);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -3046,10 +3046,10 @@ public:
void swapSuccessors();
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return (I->getOpcode() == Instruction::Br);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -3403,10 +3403,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Switch;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -3501,10 +3501,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::IndirectBr;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -3977,10 +3977,10 @@ public:
unsigned getNumSuccessors() const { return 2; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return (I->getOpcode() == Instruction::Invoke);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -4072,10 +4072,10 @@ public:
unsigned getNumSuccessors() const { return 0; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Resume;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -4260,10 +4260,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::CatchSwitch;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4306,10 +4306,10 @@ public:
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::CleanupPad;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4356,10 +4356,10 @@ public:
}
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::CatchPad;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4420,10 +4420,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return (I->getOpcode() == Instruction::CatchRet);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -4516,10 +4516,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return (I->getOpcode() == Instruction::CleanupRet);
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -4577,10 +4577,10 @@ public:
unsigned getNumSuccessors() const { return 0; }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Unreachable;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
@ -4627,10 +4627,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Trunc;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4666,10 +4666,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == ZExt;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4705,10 +4705,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == SExt;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4744,10 +4744,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == FPTrunc;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4783,10 +4783,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == FPExt;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4822,10 +4822,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == UIToFP;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4861,10 +4861,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == SIToFP;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4900,10 +4900,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == FPToUI;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4939,10 +4939,10 @@ public:
);
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == FPToSI;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -4982,10 +4982,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == IntToPtr;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -5033,10 +5033,10 @@ public:
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == PtrToInt;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -5072,10 +5072,10 @@ public:
);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == BitCast;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
};
@ -5112,10 +5112,10 @@ public:
);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == AddrSpaceCast;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}

View File

@ -53,12 +53,12 @@ namespace llvm {
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const CallInst *I) {
static bool classof(const CallInst *I) {
if (const Function *CF = I->getCalledFunction())
return CF->isIntrinsic();
return false;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<CallInst>(V) && classof(cast<CallInst>(V));
}
};
@ -72,7 +72,7 @@ namespace llvm {
Value *getVariableLocation(bool AllowNullOp = true) const;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
switch (I->getIntrinsicID()) {
case Intrinsic::dbg_declare:
case Intrinsic::dbg_value:
@ -80,7 +80,7 @@ namespace llvm {
default: return false;
}
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -107,10 +107,10 @@ namespace llvm {
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::dbg_declare;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -144,10 +144,10 @@ namespace llvm {
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::dbg_value;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -176,7 +176,7 @@ namespace llvm {
ExceptionBehavior getExceptionBehavior() const;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
switch (I->getIntrinsicID()) {
case Intrinsic::experimental_constrained_fadd:
case Intrinsic::experimental_constrained_fsub:
@ -199,7 +199,7 @@ namespace llvm {
default: return false;
}
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -288,10 +288,10 @@ namespace llvm {
setArgOperand(ARG_ELEMENTSIZE, V);
}
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memcpy_element_unordered_atomic;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -358,7 +358,7 @@ namespace llvm {
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
switch (I->getIntrinsicID()) {
case Intrinsic::memcpy:
case Intrinsic::memmove:
@ -367,7 +367,7 @@ namespace llvm {
default: return false;
}
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -387,10 +387,10 @@ namespace llvm {
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memset;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -419,11 +419,11 @@ namespace llvm {
}
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memcpy ||
I->getIntrinsicID() == Intrinsic::memmove;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -432,10 +432,10 @@ namespace llvm {
class MemCpyInst : public MemTransferInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memcpy;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -444,10 +444,10 @@ namespace llvm {
class MemMoveInst : public MemTransferInst {
public:
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::memmove;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -455,10 +455,10 @@ namespace llvm {
/// This represents the llvm.va_start intrinsic.
class VAStartInst : public IntrinsicInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::vastart;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
@ -468,10 +468,10 @@ namespace llvm {
/// This represents the llvm.va_end intrinsic.
class VAEndInst : public IntrinsicInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::vaend;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
@ -481,10 +481,10 @@ namespace llvm {
/// This represents the llvm.va_copy intrinsic.
class VACopyInst : public IntrinsicInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::vacopy;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
@ -495,10 +495,10 @@ namespace llvm {
/// This represents the llvm.instrprof_increment intrinsic.
class InstrProfIncrementInst : public IntrinsicInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::instrprof_increment;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
@ -524,10 +524,10 @@ namespace llvm {
class InstrProfIncrementInstStep : public InstrProfIncrementInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::instrprof_increment_step;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -535,10 +535,10 @@ namespace llvm {
/// This represents the llvm.instrprof_value_profile intrinsic.
class InstrProfValueProfileInst : public IntrinsicInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::instrprof_value_profile;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}

View File

@ -54,9 +54,9 @@ public:
return Instruction::UserOp1;
}
static inline bool classof(const Instruction *) { return true; }
static inline bool classof(const ConstantExpr *) { return true; }
static inline bool classof(const Value *V) {
static bool classof(const Instruction *) { return true; }
static bool classof(const ConstantExpr *) { return true; }
static bool classof(const Value *V) {
return isa<Instruction>(V) || isa<ConstantExpr>(V);
}
};
@ -97,19 +97,19 @@ public:
return (SubclassOptionalData & NoSignedWrap) != 0;
}
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Instruction::Add ||
I->getOpcode() == Instruction::Sub ||
I->getOpcode() == Instruction::Mul ||
I->getOpcode() == Instruction::Shl;
}
static inline bool classof(const ConstantExpr *CE) {
static bool classof(const ConstantExpr *CE) {
return CE->getOpcode() == Instruction::Add ||
CE->getOpcode() == Instruction::Sub ||
CE->getOpcode() == Instruction::Mul ||
CE->getOpcode() == Instruction::Shl;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
(isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
}
@ -144,13 +144,13 @@ public:
OpC == Instruction::LShr;
}
static inline bool classof(const ConstantExpr *CE) {
static bool classof(const ConstantExpr *CE) {
return isPossiblyExactOpcode(CE->getOpcode());
}
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return isPossiblyExactOpcode(I->getOpcode());
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
(isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
}
@ -324,17 +324,17 @@ public:
/// precision.
float getFPAccuracy() const;
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getType()->isFPOrFPVectorTy() ||
I->getOpcode() == Instruction::FCmp;
}
static inline bool classof(const ConstantExpr *CE) {
static bool classof(const ConstantExpr *CE) {
return CE->getType()->isFPOrFPVectorTy() ||
CE->getOpcode() == Instruction::FCmp;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
(isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
}
@ -344,13 +344,13 @@ public:
template<typename SuperClass, unsigned Opc>
class ConcreteOperator : public SuperClass {
public:
static inline bool classof(const Instruction *I) {
static bool classof(const Instruction *I) {
return I->getOpcode() == Opc;
}
static inline bool classof(const ConstantExpr *CE) {
static bool classof(const ConstantExpr *CE) {
return CE->getOpcode() == Opc;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
(isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
}

View File

@ -329,12 +329,12 @@ public:
/// Currently, the only projections available are gc.result and gc.relocate.
class GCProjectionInst : public IntrinsicInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::experimental_gc_relocate ||
I->getIntrinsicID() == Intrinsic::experimental_gc_result;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
@ -373,11 +373,11 @@ public:
/// Represents calls to the gc.relocate intrinsic.
class GCRelocateInst : public GCProjectionInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::experimental_gc_relocate;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
@ -408,11 +408,11 @@ public:
/// Represents calls to the gc.result intrinsic.
class GCResultInst : public GCProjectionInst {
public:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::experimental_gc_result;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};

View File

@ -288,7 +288,7 @@ public:
void replaceUsesOfWith(Value *From, Value *To);
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<Instruction>(V) || isa<Constant>(V);
}
};

View File

@ -253,7 +253,7 @@ public:
}
// Cast methods.
static inline bool classof(Binary const *v) {
static bool classof(Binary const *v) {
return v->isArchive();
}

View File

@ -1026,7 +1026,7 @@ public:
bool isRelocatableObject() const override;
bool is64() const { return PE32PlusHeader; }
static inline bool classof(const Binary *v) { return v->isCOFF(); }
static bool classof(const Binary *v) { return v->isCOFF(); }
};
// The iterator for the import directory table.

View File

@ -33,7 +33,7 @@ public:
COFFImportFile(MemoryBufferRef Source)
: SymbolicFile(ID_COFFImportFile, Source) {}
static inline bool classof(Binary const *V) { return V->isCOFFImportFile(); }
static bool classof(Binary const *V) { return V->isCOFFImportFile(); }
void moveSymbolNext(DataRefImpl &Symb) const override { ++Symb.p; }

View File

@ -70,7 +70,7 @@ public:
elf_symbol_iterator_range symbols() const;
static inline bool classof(const Binary *v) { return v->isELF(); }
static bool classof(const Binary *v) { return v->isELF(); }
SubtargetFeatures getFeatures() const override;
@ -389,7 +389,7 @@ public:
const ELFFile<ELFT> *getELFFile() const { return &EF; }
bool isDyldType() const { return isDyldELFObject; }
static inline bool classof(const Binary *v) {
static bool classof(const Binary *v) {
return v->getType() == getELFType(ELFT::TargetEndianness == support::little,
ELFT::Is64Bits);
}

View File

@ -46,7 +46,7 @@ public:
StringRef getTargetTriple() const;
static inline bool classof(const Binary *v) {
static bool classof(const Binary *v) {
return v->isIR();
}

View File

@ -154,7 +154,7 @@ public:
uint32_t getNumberOfObjects() const { return NumberOfObjects; }
// Cast methods.
static inline bool classof(Binary const *V) {
static bool classof(Binary const *V) {
return V->isMachOUniversalBinary();
}

View File

@ -313,7 +313,7 @@ public:
return createObjectFile(Object, llvm::file_magic::unknown);
}
static inline bool classof(const Binary *v) {
static bool classof(const Binary *v) {
return v->isObject();
}

View File

@ -173,7 +173,7 @@ public:
static Expected<OwningBinary<SymbolicFile>>
createSymbolicFile(StringRef ObjectPath);
static inline bool classof(const Binary *v) {
static bool classof(const Binary *v) {
return v->isSymbolic();
}
};

View File

@ -188,7 +188,7 @@ public:
NullNode(std::unique_ptr<Document> &D)
: Node(NK_Null, D, StringRef(), StringRef()) {}
static inline bool classof(const Node *N) { return N->getType() == NK_Null; }
static bool classof(const Node *N) { return N->getType() == NK_Null; }
};
/// \brief A scalar node is an opaque datum that can be presented as a
@ -220,7 +220,7 @@ public:
/// This happens with escaped characters and multi-line literals.
StringRef getValue(SmallVectorImpl<char> &Storage) const;
static inline bool classof(const Node *N) {
static bool classof(const Node *N) {
return N->getType() == NK_Scalar;
}
@ -254,7 +254,7 @@ public:
/// \brief Gets the value of this node as a StringRef.
StringRef getValue() const { return Value; }
static inline bool classof(const Node *N) {
static bool classof(const Node *N) {
return N->getType() == NK_BlockScalar;
}
@ -296,7 +296,7 @@ public:
Val->skip();
}
static inline bool classof(const Node *N) {
static bool classof(const Node *N) {
return N->getType() == NK_KeyValue;
}
@ -419,7 +419,7 @@ public:
void skip() override { yaml::skip(*this); }
static inline bool classof(const Node *N) {
static bool classof(const Node *N) {
return N->getType() == NK_Mapping;
}
@ -476,7 +476,7 @@ public:
void skip() override { yaml::skip(*this); }
static inline bool classof(const Node *N) {
static bool classof(const Node *N) {
return N->getType() == NK_Sequence;
}
@ -502,7 +502,7 @@ public:
StringRef getName() const { return Name; }
Node *getTarget();
static inline bool classof(const Node *N) { return N->getType() == NK_Alias; }
static bool classof(const Node *N) { return N->getType() == NK_Alias; }
private:
StringRef Name;

View File

@ -1148,7 +1148,7 @@ private:
HNode(Node *n) : _node(n) { }
virtual ~HNode() = default;
static inline bool classof(const HNode *) { return true; }
static bool classof(const HNode *) { return true; }
Node *_node;
};
@ -1159,11 +1159,9 @@ private:
public:
EmptyHNode(Node *n) : HNode(n) { }
static inline bool classof(const HNode *n) {
return NullNode::classof(n->_node);
}
static bool classof(const HNode *n) { return NullNode::classof(n->_node); }
static inline bool classof(const EmptyHNode *) { return true; }
static bool classof(const EmptyHNode *) { return true; }
};
class ScalarHNode : public HNode {
@ -1174,12 +1172,12 @@ private:
StringRef value() const { return _value; }
static inline bool classof(const HNode *n) {
static bool classof(const HNode *n) {
return ScalarNode::classof(n->_node) ||
BlockScalarNode::classof(n->_node);
}
static inline bool classof(const ScalarHNode *) { return true; }
static bool classof(const ScalarHNode *) { return true; }
protected:
StringRef _value;
@ -1191,11 +1189,11 @@ private:
public:
MapHNode(Node *n) : HNode(n) { }
static inline bool classof(const HNode *n) {
static bool classof(const HNode *n) {
return MappingNode::classof(n->_node);
}
static inline bool classof(const MapHNode *) { return true; }
static bool classof(const MapHNode *) { return true; }
using NameToNode = StringMap<std::unique_ptr<HNode>>;
@ -1209,11 +1207,11 @@ private:
public:
SequenceHNode(Node *n) : HNode(n) { }
static inline bool classof(const HNode *n) {
static bool classof(const HNode *n) {
return SequenceNode::classof(n->_node);
}
static inline bool classof(const SequenceHNode *) { return true; }
static bool classof(const SequenceHNode *) { return true; }
std::vector<std::unique_ptr<HNode>> Entries;
};

View File

@ -114,7 +114,7 @@ protected:
class PredicateWithCondition : public PredicateBase {
public:
Value *Condition;
static inline bool classof(const PredicateBase *PB) {
static bool classof(const PredicateBase *PB) {
return PB->Type == PT_Assume || PB->Type == PT_Branch ||
PB->Type == PT_Switch;
}
@ -134,7 +134,7 @@ public:
: PredicateWithCondition(PT_Assume, Op, Condition),
AssumeInst(AssumeInst) {}
PredicateAssume() = delete;
static inline bool classof(const PredicateBase *PB) {
static bool classof(const PredicateBase *PB) {
return PB->Type == PT_Assume;
}
};
@ -147,7 +147,7 @@ public:
BasicBlock *From;
BasicBlock *To;
PredicateWithEdge() = delete;
static inline bool classof(const PredicateBase *PB) {
static bool classof(const PredicateBase *PB) {
return PB->Type == PT_Branch || PB->Type == PT_Switch;
}
@ -167,7 +167,7 @@ public:
: PredicateWithEdge(PT_Branch, Op, BranchBB, SplitBB, Condition),
TrueEdge(TakenEdge) {}
PredicateBranch() = delete;
static inline bool classof(const PredicateBase *PB) {
static bool classof(const PredicateBase *PB) {
return PB->Type == PT_Branch;
}
};
@ -183,7 +183,7 @@ public:
SI->getCondition()),
CaseValue(CaseValue), Switch(SI) {}
PredicateSwitch() = delete;
static inline bool classof(const PredicateBase *PB) {
static bool classof(const PredicateBase *PB) {
return PB->Type == PT_Switch;
}
};

View File

@ -78,11 +78,11 @@ public:
void updateSymbolAddress(const SymbolRef &SymRef, uint64_t Addr);
// Methods for type inquiry through isa, cast and dyn_cast
static inline bool classof(const Binary *v) {
static bool classof(const Binary *v) {
return (isa<ELFObjectFile<ELFT>>(v) &&
classof(cast<ELFObjectFile<ELFT>>(v)));
}
static inline bool classof(const ELFObjectFile<ELFT> *v) {
static bool classof(const ELFObjectFile<ELFT> *v) {
return v->isDyldType();
}
};

View File

@ -58,10 +58,10 @@ public:
}
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_subfn_addr;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -70,10 +70,10 @@ public:
class LLVM_LIBRARY_VISIBILITY CoroAllocInst : public IntrinsicInst {
public:
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_alloc;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -175,10 +175,10 @@ public:
}
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_id;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -187,10 +187,10 @@ public:
class LLVM_LIBRARY_VISIBILITY CoroFrameInst : public IntrinsicInst {
public:
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_frame;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -203,10 +203,10 @@ public:
Value *getFrame() const { return getArgOperand(FrameArg); }
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_free;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -221,10 +221,10 @@ public:
Value *getMem() const { return getArgOperand(MemArg); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_begin;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -233,10 +233,10 @@ public:
class LLVM_LIBRARY_VISIBILITY CoroSaveInst : public IntrinsicInst {
public:
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_save;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -254,10 +254,10 @@ public:
}
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_promise;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -279,10 +279,10 @@ public:
}
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_suspend;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -291,10 +291,10 @@ public:
class LLVM_LIBRARY_VISIBILITY CoroSizeInst : public IntrinsicInst {
public:
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_size;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};
@ -310,10 +310,10 @@ public:
}
// Methods to support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const IntrinsicInst *I) {
static bool classof(const IntrinsicInst *I) {
return I->getIntrinsicID() == Intrinsic::coro_end;
}
static inline bool classof(const Value *V) {
static bool classof(const Value *V) {
return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V));
}
};

View File

@ -208,7 +208,7 @@ public:
Children.resize(NC);
}
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == Scope;
}
@ -233,7 +233,7 @@ public:
const std::string &getWhatFor() const { return WhatFor; }
unsigned getResultNo() const { return ResultNo; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == RecordNode;
}
@ -265,7 +265,7 @@ public:
const std::string &getWhatFor() const { return WhatFor; }
unsigned getResultNo() const { return ResultNo; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == RecordChild;
}
@ -281,7 +281,7 @@ class RecordMemRefMatcher : public Matcher {
public:
RecordMemRefMatcher() : Matcher(RecordMemRef) {}
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == RecordMemRef;
}
@ -297,7 +297,7 @@ class CaptureGlueInputMatcher : public Matcher {
public:
CaptureGlueInputMatcher() : Matcher(CaptureGlueInput) {}
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CaptureGlueInput;
}
@ -315,7 +315,7 @@ public:
unsigned getChildNo() const { return ChildNo; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == MoveChild;
}
@ -332,7 +332,7 @@ class MoveParentMatcher : public Matcher {
public:
MoveParentMatcher() : Matcher(MoveParent) {}
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == MoveParent;
}
@ -352,7 +352,7 @@ public:
unsigned getMatchNumber() const { return MatchNumber; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckSame;
}
@ -376,7 +376,7 @@ public:
unsigned getChildNo() const { return ChildNo; }
unsigned getMatchNumber() const { return MatchNumber; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckChildSame;
}
@ -399,7 +399,7 @@ public:
StringRef getPredicate() const { return Predicate; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckPatternPredicate;
}
@ -419,7 +419,7 @@ public:
TreePredicateFn getPredicate() const;
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckPredicate;
}
@ -441,7 +441,7 @@ public:
const SDNodeInfo &getOpcode() const { return Opcode; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckOpcode;
}
@ -462,7 +462,7 @@ public:
: Matcher(SwitchOpcode), Cases(cases.begin(), cases.end()) {}
~SwitchOpcodeMatcher() override;
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == SwitchOpcode;
}
@ -489,7 +489,7 @@ public:
MVT::SimpleValueType getType() const { return Type; }
unsigned getResNo() const { return ResNo; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckType;
}
@ -512,7 +512,7 @@ public:
: Matcher(SwitchType), Cases(cases.begin(), cases.end()) {}
~SwitchTypeMatcher() override;
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == SwitchType;
}
@ -540,7 +540,7 @@ public:
unsigned getChildNo() const { return ChildNo; }
MVT::SimpleValueType getType() const { return Type; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckChildType;
}
@ -564,7 +564,7 @@ public:
int64_t getValue() const { return Value; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckInteger;
}
@ -588,7 +588,7 @@ public:
unsigned getChildNo() const { return ChildNo; }
int64_t getValue() const { return Value; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckChildInteger;
}
@ -611,7 +611,7 @@ public:
StringRef getCondCodeName() const { return CondCodeName; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckCondCode;
}
@ -632,7 +632,7 @@ public:
StringRef getTypeName() const { return TypeName; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckValueType;
}
@ -673,7 +673,7 @@ public:
const std::string getName() const { return Name; }
unsigned getFirstResult() const { return FirstResult; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckComplexPat;
}
@ -695,7 +695,7 @@ public:
int64_t getValue() const { return Value; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckAndImm;
}
@ -716,7 +716,7 @@ public:
int64_t getValue() const { return Value; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckOrImm;
}
@ -734,7 +734,7 @@ public:
CheckFoldableChainNodeMatcher()
: Matcher(CheckFoldableChainNode) {}
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CheckFoldableChainNode;
}
@ -754,7 +754,7 @@ public:
int64_t getValue() const { return Val; }
MVT::SimpleValueType getVT() const { return VT; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitInteger;
}
@ -778,7 +778,7 @@ public:
const std::string &getValue() const { return Val; }
MVT::SimpleValueType getVT() const { return VT; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitStringInteger;
}
@ -803,7 +803,7 @@ public:
const CodeGenRegister *getReg() const { return Reg; }
MVT::SimpleValueType getVT() const { return VT; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitRegister;
}
@ -826,7 +826,7 @@ public:
unsigned getSlot() const { return Slot; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitConvertToTarget;
}
@ -854,7 +854,7 @@ public:
return ChainNodes[i];
}
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitMergeInputChains;
}
@ -878,7 +878,7 @@ public:
unsigned getSrcSlot() const { return SrcSlot; }
Record *getDestPhysReg() const { return DestPhysReg; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitCopyToReg;
}
@ -904,7 +904,7 @@ public:
unsigned getSlot() const { return Slot; }
Record *getNodeXForm() const { return NodeXForm; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitNodeXForm;
}
@ -964,7 +964,7 @@ public:
bool hasMemRefs() const { return HasMemRefs; }
int getNumFixedArityOperands() const { return NumFixedArityOperands; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitNode || N->getKind() == MorphNodeTo;
}
@ -991,7 +991,7 @@ public:
unsigned getFirstResultSlot() const { return FirstResultSlot; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == EmitNode;
}
@ -1015,7 +1015,7 @@ public:
const PatternToMatch &getPattern() const { return Pattern; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == MorphNodeTo;
}
};
@ -1036,7 +1036,7 @@ public:
unsigned getResult(unsigned R) const { return Results[R]; }
const PatternToMatch &getPattern() const { return Pattern; }
static inline bool classof(const Matcher *N) {
static bool classof(const Matcher *N) {
return N->getKind() == CompleteMatch;
}