llvm.org GIT mirror llvm / ed84062
Remove unnecessary classof()'s isa<> et al. automatically infer when the cast is an upcast (including a self-cast), so these are no longer necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165767 91177308-0d34-0410-b5e6-96231b3b80d8 Sean Silva 7 years ago
43 changed file(s) with 0 addition(s) and 214 deletion(s). Raw diff Collapse all Expand all
161161 SCEVCouldNotCompute();
162162
163163 /// Methods for support type inquiry through isa, cast, and dyn_cast:
164 static inline bool classof(const SCEVCouldNotCompute *S) { return true; }
165164 static bool classof(const SCEV *S);
166165 };
167166
4545 Type *getType() const { return V->getType(); }
4646
4747 /// Methods for support type inquiry through isa, cast, and dyn_cast:
48 static inline bool classof(const SCEVConstant *S) { return true; }
4948 static inline bool classof(const SCEV *S) {
5049 return S->getSCEVType() == scConstant;
5150 }
6766 Type *getType() const { return Ty; }
6867
6968 /// Methods for support type inquiry through isa, cast, and dyn_cast:
70 static inline bool classof(const SCEVCastExpr *S) { return true; }
7169 static inline bool classof(const SCEV *S) {
7270 return S->getSCEVType() == scTruncate ||
7371 S->getSCEVType() == scZeroExtend ||
8785
8886 public:
8987 /// Methods for support type inquiry through isa, cast, and dyn_cast:
90 static inline bool classof(const SCEVTruncateExpr *S) { return true; }
9188 static inline bool classof(const SCEV *S) {
9289 return S->getSCEVType() == scTruncate;
9390 }
105102
106103 public:
107104 /// Methods for support type inquiry through isa, cast, and dyn_cast:
108 static inline bool classof(const SCEVZeroExtendExpr *S) { return true; }
109105 static inline bool classof(const SCEV *S) {
110106 return S->getSCEVType() == scZeroExtend;
111107 }
123119
124120 public:
125121 /// Methods for support type inquiry through isa, cast, and dyn_cast:
126 static inline bool classof(const SCEVSignExtendExpr *S) { return true; }
127122 static inline bool classof(const SCEV *S) {
128123 return S->getSCEVType() == scSignExtend;
129124 }
165160 }
166161
167162 /// Methods for support type inquiry through isa, cast, and dyn_cast:
168 static inline bool classof(const SCEVNAryExpr *S) { return true; }
169163 static inline bool classof(const SCEV *S) {
170164 return S->getSCEVType() == scAddExpr ||
171165 S->getSCEVType() == scMulExpr ||
187181
188182 public:
189183 /// Methods for support type inquiry through isa, cast, and dyn_cast:
190 static inline bool classof(const SCEVCommutativeExpr *S) { return true; }
191184 static inline bool classof(const SCEV *S) {
192185 return S->getSCEVType() == scAddExpr ||
193186 S->getSCEVType() == scMulExpr ||
222215 }
223216
224217 /// Methods for support type inquiry through isa, cast, and dyn_cast:
225 static inline bool classof(const SCEVAddExpr *S) { return true; }
226218 static inline bool classof(const SCEV *S) {
227219 return S->getSCEVType() == scAddExpr;
228220 }
241233
242234 public:
243235 /// Methods for support type inquiry through isa, cast, and dyn_cast:
244 static inline bool classof(const SCEVMulExpr *S) { return true; }
245236 static inline bool classof(const SCEV *S) {
246237 return S->getSCEVType() == scMulExpr;
247238 }
273264 }
274265
275266 /// Methods for support type inquiry through isa, cast, and dyn_cast:
276 static inline bool classof(const SCEVUDivExpr *S) { return true; }
277267 static inline bool classof(const SCEV *S) {
278268 return S->getSCEVType() == scUDivExpr;
279269 }
357347 }
358348
359349 /// Methods for support type inquiry through isa, cast, and dyn_cast:
360 static inline bool classof(const SCEVAddRecExpr *S) { return true; }
361350 static inline bool classof(const SCEV *S) {
362351 return S->getSCEVType() == scAddRecExpr;
363352 }
379368
380369 public:
381370 /// Methods for support type inquiry through isa, cast, and dyn_cast:
382 static inline bool classof(const SCEVSMaxExpr *S) { return true; }
383371 static inline bool classof(const SCEV *S) {
384372 return S->getSCEVType() == scSMaxExpr;
385373 }
401389
402390 public:
403391 /// Methods for support type inquiry through isa, cast, and dyn_cast:
404 static inline bool classof(const SCEVUMaxExpr *S) { return true; }
405392 static inline bool classof(const SCEV *S) {
406393 return S->getSCEVType() == scUMaxExpr;
407394 }
448435 Type *getType() const { return getValPtr()->getType(); }
449436
450437 /// Methods for support type inquiry through isa, cast, and dyn_cast:
451 static inline bool classof(const SCEVUnknown *S) { return true; }
452438 static inline bool classof(const SCEV *S) {
453439 return S->getSCEVType() == scUnknown;
454440 }
8080 /// classof - Methods for support type inquiry through isa, cast, and
8181 /// dyn_cast:
8282 ///
83 static inline bool classof(const Argument *) { return true; }
8483 static inline bool classof(const Value *V) {
8584 return V->getValueID() == ArgumentVal;
8685 }
212212 ValueSymbolTable *getValueSymbolTable();
213213
214214 /// Methods for support type inquiry through isa, cast, and dyn_cast:
215 static inline bool classof(const BasicBlock *) { return true; }
216215 static inline bool classof(const Value *V) {
217216 return V->getValueID() == Value::BasicBlockVal;
218217 }
4949 /// classof - Methods for support type inquiry through isa, cast, and
5050 /// dyn_cast:
5151 ///
52 static inline bool classof(const PseudoSourceValue *) { return true; }
5352 static inline bool classof(const Value *V) {
5453 return V->getValueID() == PseudoSourceValueVal ||
5554 V->getValueID() == FixedStackPseudoSourceValueVal;
8988 /// classof - Methods for support type inquiry through isa, cast, and
9089 /// dyn_cast:
9190 ///
92 static inline bool classof(const FixedStackPseudoSourceValue *) {
93 return true;
94 }
9591 static inline bool classof(const Value *V) {
9692 return V->getValueID() == FixedStackPseudoSourceValueVal;
9793 }
660660 /// that appear multiple times wherever they are used.
661661 ///
662662 void dumprWithDepth(const SelectionDAG *G = 0, unsigned depth = 100) const;
663
664
665 static bool classof(const SDNode *) { return true; }
666663
667664 /// Profile - Gather unique data for the node.
668665 ///
975972 }
976973
977974 // Methods to support isa and dyn_cast
978 static bool classof(const MemSDNode *) { return true; }
979975 static bool classof(const SDNode *N) {
980976 // For some targets, we lower some target intrinsics to a MemIntrinsicNode
981977 // with either an intrinsic or a target opcode.
10601056 }
10611057
10621058 // Methods to support isa and dyn_cast
1063 static bool classof(const AtomicSDNode *) { return true; }
10641059 static bool classof(const SDNode *N) {
10651060 return N->getOpcode() == ISD::ATOMIC_CMP_SWAP ||
10661061 N->getOpcode() == ISD::ATOMIC_SWAP ||
10921087 }
10931088
10941089 // Methods to support isa and dyn_cast
1095 static bool classof(const MemIntrinsicSDNode *) { return true; }
10961090 static bool classof(const SDNode *N) {
10971091 // We lower some target intrinsics to their target opcode
10981092 // early a node with a target opcode can be of this class
11471141 }
11481142 static bool isSplatMask(const int *Mask, EVT VT);
11491143
1150 static bool classof(const ShuffleVectorSDNode *) { return true; }
11511144 static bool classof(const SDNode *N) {
11521145 return N->getOpcode() == ISD::VECTOR_SHUFFLE;
11531146 }
11711164 bool isNullValue() const { return Value->isNullValue(); }
11721165 bool isAllOnesValue() const { return Value->isAllOnesValue(); }
11731166
1174 static bool classof(const ConstantSDNode *) { return true; }
11751167 static bool classof(const SDNode *N) {
11761168 return N->getOpcode() == ISD::Constant ||
11771169 N->getOpcode() == ISD::TargetConstant;
12181210
12191211 static bool isValueValidForType(EVT VT, const APFloat& Val);
12201212
1221 static bool classof(const ConstantFPSDNode *) { return true; }
12221213 static bool classof(const SDNode *N) {
12231214 return N->getOpcode() == ISD::ConstantFP ||
12241215 N->getOpcode() == ISD::TargetConstantFP;
12401231 // Return the address space this GlobalAddress belongs to.
12411232 unsigned getAddressSpace() const;
12421233
1243 static bool classof(const GlobalAddressSDNode *) { return true; }
12441234 static bool classof(const SDNode *N) {
12451235 return N->getOpcode() == ISD::GlobalAddress ||
12461236 N->getOpcode() == ISD::TargetGlobalAddress ||
12601250
12611251 int getIndex() const { return FI; }
12621252
1263 static bool classof(const FrameIndexSDNode *) { return true; }
12641253 static bool classof(const SDNode *N) {
12651254 return N->getOpcode() == ISD::FrameIndex ||
12661255 N->getOpcode() == ISD::TargetFrameIndex;
12801269 int getIndex() const { return JTI; }
12811270 unsigned char getTargetFlags() const { return TargetFlags; }
12821271
1283 static bool classof(const JumpTableSDNode *) { return true; }
12841272 static bool classof(const SDNode *N) {
12851273 return N->getOpcode() == ISD::JumpTable ||
12861274 N->getOpcode() == ISD::TargetJumpTable;
13411329
13421330 Type *getType() const;
13431331
1344 static bool classof(const ConstantPoolSDNode *) { return true; }
13451332 static bool classof(const SDNode *N) {
13461333 return N->getOpcode() == ISD::ConstantPool ||
13471334 N->getOpcode() == ISD::TargetConstantPool;
13651352 int getIndex() const { return Index; }
13661353 int64_t getOffset() const { return Offset; }
13671354
1368 static bool classof(const TargetIndexSDNode*) { return true; }
13691355 static bool classof(const SDNode *N) {
13701356 return N->getOpcode() == ISD::TargetIndex;
13711357 }
13841370
13851371 MachineBasicBlock *getBasicBlock() const { return MBB; }
13861372
1387 static bool classof(const BasicBlockSDNode *) { return true; }
13881373 static bool classof(const SDNode *N) {
13891374 return N->getOpcode() == ISD::BasicBlock;
13901375 }
14091394 unsigned &SplatBitSize, bool &HasAnyUndefs,
14101395 unsigned MinSplatBits = 0, bool isBigEndian = false);
14111396
1412 static inline bool classof(const BuildVectorSDNode *) { return true; }
14131397 static inline bool classof(const SDNode *N) {
14141398 return N->getOpcode() == ISD::BUILD_VECTOR;
14151399 }
14301414 /// getValue - return the contained Value.
14311415 const Value *getValue() const { return V; }
14321416
1433 static bool classof(const SrcValueSDNode *) { return true; }
14341417 static bool classof(const SDNode *N) {
14351418 return N->getOpcode() == ISD::SRCVALUE;
14361419 }
14451428
14461429 const MDNode *getMD() const { return MD; }
14471430
1448 static bool classof(const MDNodeSDNode *) { return true; }
14491431 static bool classof(const SDNode *N) {
14501432 return N->getOpcode() == ISD::MDNODE_SDNODE;
14511433 }
14621444
14631445 unsigned getReg() const { return Reg; }
14641446
1465 static bool classof(const RegisterSDNode *) { return true; }
14661447 static bool classof(const SDNode *N) {
14671448 return N->getOpcode() == ISD::Register;
14681449 }
14791460
14801461 const uint32_t *getRegMask() const { return RegMask; }
14811462
1482 static bool classof(const RegisterMaskSDNode *) { return true; }
14831463 static bool classof(const SDNode *N) {
14841464 return N->getOpcode() == ISD::RegisterMask;
14851465 }
15001480 int64_t getOffset() const { return Offset; }
15011481 unsigned char getTargetFlags() const { return TargetFlags; }
15021482
1503 static bool classof(const BlockAddressSDNode *) { return true; }
15041483 static bool classof(const SDNode *N) {
15051484 return N->getOpcode() == ISD::BlockAddress ||
15061485 N->getOpcode() == ISD::TargetBlockAddress;
15181497 public:
15191498 MCSymbol *getLabel() const { return Label; }
15201499
1521 static bool classof(const EHLabelSDNode *) { return true; }
15221500 static bool classof(const SDNode *N) {
15231501 return N->getOpcode() == ISD::EH_LABEL;
15241502 }
15381516 const char *getSymbol() const { return Symbol; }
15391517 unsigned char getTargetFlags() const { return TargetFlags; }
15401518
1541 static bool classof(const ExternalSymbolSDNode *) { return true; }
15421519 static bool classof(const SDNode *N) {
15431520 return N->getOpcode() == ISD::ExternalSymbol ||
15441521 N->getOpcode() == ISD::TargetExternalSymbol;
15561533
15571534 ISD::CondCode get() const { return Condition; }
15581535
1559 static bool classof(const CondCodeSDNode *) { return true; }
15601536 static bool classof(const SDNode *N) {
15611537 return N->getOpcode() == ISD::CONDCODE;
15621538 }
15761552 public:
15771553 ISD::CvtCode getCvtCode() const { return CvtCode; }
15781554
1579 static bool classof(const CvtRndSatSDNode *) { return true; }
15801555 static bool classof(const SDNode *N) {
15811556 return N->getOpcode() == ISD::CONVERT_RNDSAT;
15821557 }
15951570
15961571 EVT getVT() const { return ValueType; }
15971572
1598 static bool classof(const VTSDNode *) { return true; }
15991573 static bool classof(const SDNode *N) {
16001574 return N->getOpcode() == ISD::VALUETYPE;
16011575 }
16391613 /// isUnindexed - Return true if this is NOT a pre/post inc/dec load/store.
16401614 bool isUnindexed() const { return getAddressingMode() == ISD::UNINDEXED; }
16411615
1642 static bool classof(const LSBaseSDNode *) { return true; }
16431616 static bool classof(const SDNode *N) {
16441617 return N->getOpcode() == ISD::LOAD ||
16451618 N->getOpcode() == ISD::STORE;
16711644 const SDValue &getBasePtr() const { return getOperand(1); }
16721645 const SDValue &getOffset() const { return getOperand(2); }
16731646
1674 static bool classof(const LoadSDNode *) { return true; }
16751647 static bool classof(const SDNode *N) {
16761648 return N->getOpcode() == ISD::LOAD;
16771649 }
17021674 const SDValue &getBasePtr() const { return getOperand(2); }
17031675 const SDValue &getOffset() const { return getOperand(3); }
17041676
1705 static bool classof(const StoreSDNode *) { return true; }
17061677 static bool classof(const SDNode *N) {
17071678 return N->getOpcode() == ISD::STORE;
17081679 }
17431714 MemRefsEnd = NewMemRefsEnd;
17441715 }
17451716
1746 static bool classof(const MachineSDNode *) { return true; }
17471717 static bool classof(const SDNode *N) {
17481718 return N->isMachineOpcode();
17491719 }
107107 virtual void destroyConstant() { llvm_unreachable("Not reached!"); }
108108
109109 //// Methods for support type inquiry through isa, cast, and dyn_cast:
110 static inline bool classof(const Constant *) { return true; }
111 static inline bool classof(const GlobalValue *) { return true; }
112110 static inline bool classof(const Value *V) {
113111 return V->getValueID() >= ConstantFirstVal &&
114112 V->getValueID() <= ConstantLastVal;
220220 }
221221
222222 /// @brief Methods to support type inquiry through isa, cast, and dyn_cast.
223 static inline bool classof(const ConstantInt *) { return true; }
224223 static bool classof(const Value *V) {
225224 return V->getValueID() == ConstantIntVal;
226225 }
290289 return isExactlyValue(FV);
291290 }
292291 /// Methods for support type inquiry through isa, cast, and dyn_cast:
293 static inline bool classof(const ConstantFP *) { return true; }
294292 static bool classof(const Value *V) {
295293 return V->getValueID() == ConstantFPVal;
296294 }
333331
334332 /// Methods for support type inquiry through isa, cast, and dyn_cast:
335333 ///
336 static bool classof(const ConstantAggregateZero *) { return true; }
337334 static bool classof(const Value *V) {
338335 return V->getValueID() == ConstantAggregateZeroVal;
339336 }
366363 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
367364
368365 /// Methods for support type inquiry through isa, cast, and dyn_cast:
369 static inline bool classof(const ConstantArray *) { return true; }
370366 static bool classof(const Value *V) {
371367 return V->getValueID() == ConstantArrayVal;
372368 }
425421 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
426422
427423 /// Methods for support type inquiry through isa, cast, and dyn_cast:
428 static inline bool classof(const ConstantStruct *) { return true; }
429424 static bool classof(const Value *V) {
430425 return V->getValueID() == ConstantStructVal;
431426 }
473468 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
474469
475470 /// Methods for support type inquiry through isa, cast, and dyn_cast:
476 static inline bool classof(const ConstantVector *) { return true; }
477471 static bool classof(const Value *V) {
478472 return V->getValueID() == ConstantVectorVal;
479473 }
516510 }
517511
518512 /// Methods for support type inquiry through isa, cast, and dyn_cast:
519 static inline bool classof(const ConstantPointerNull *) { return true; }
520513 static bool classof(const Value *V) {
521514 return V->getValueID() == ConstantPointerNullVal;
522515 }
638631
639632 /// Methods for support type inquiry through isa, cast, and dyn_cast:
640633 ///
641 static bool classof(const ConstantDataSequential *) { return true; }
642634 static bool classof(const Value *V) {
643635 return V->getValueID() == ConstantDataArrayVal ||
644636 V->getValueID() == ConstantDataVectorVal;
694686
695687 /// Methods for support type inquiry through isa, cast, and dyn_cast:
696688 ///
697 static bool classof(const ConstantDataArray *) { return true; }
698689 static bool classof(const Value *V) {
699690 return V->getValueID() == ConstantDataArrayVal;
700691 }
748739
749740 /// Methods for support type inquiry through isa, cast, and dyn_cast:
750741 ///
751 static bool classof(const ConstantDataVector *) { return true; }
752742 static bool classof(const Value *V) {
753743 return V->getValueID() == ConstantDataVectorVal;
754744 }
780770 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
781771
782772 /// Methods for support type inquiry through isa, cast, and dyn_cast:
783 static inline bool classof(const BlockAddress *) { return true; }
784773 static inline bool classof(const Value *V) {
785774 return V->getValueID() == BlockAddressVal;
786775 }
10931082 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
10941083
10951084 /// Methods for support type inquiry through isa, cast, and dyn_cast:
1096 static inline bool classof(const ConstantExpr *) { return true; }
10971085 static inline bool classof(const Value *V) {
10981086 return V->getValueID() == ConstantExprVal;
10991087 }
11581146 virtual void destroyConstant();
11591147
11601148 /// Methods for support type inquiry through isa, cast, and dyn_cast:
1161 static inline bool classof(const UndefValue *) { return true; }
11621149 static bool classof(const Value *V) {
11631150 return V->getValueID() == UndefValueVal;
11641151 }
8484 bool isPowerOf2ByteWidth() const;
8585
8686 // Methods for support type inquiry through isa, cast, and dyn_cast.
87 static inline bool classof(const IntegerType *) { return true; }
8887 static inline bool classof(const Type *T) {
8988 return T->getTypeID() == IntegerTyID;
9089 }
133132 unsigned getNumParams() const { return NumContainedTys - 1; }
134133
135134 // Methods for support type inquiry through isa, cast, and dyn_cast.
136 static inline bool classof(const FunctionType *) { return true; }
137135 static inline bool classof(const Type *T) {
138136 return T->getTypeID() == FunctionTyID;
139137 }
156154 bool indexValid(unsigned Idx) const;
157155
158156 // Methods for support type inquiry through isa, cast, and dyn_cast.
159 static inline bool classof(const CompositeType *) { return true; }
160157 static inline bool classof(const Type *T) {
161158 return T->getTypeID() == ArrayTyID ||
162159 T->getTypeID() == StructTyID ||
292289 }
293290
294291 // Methods for support type inquiry through isa, cast, and dyn_cast.
295 static inline bool classof(const StructType *) { return true; }
296292 static inline bool classof(const Type *T) {
297293 return T->getTypeID() == StructTyID;
298294 }
322318 Type *getElementType() const { return ContainedTys[0]; }
323319
324320 // Methods for support type inquiry through isa, cast, and dyn_cast.
325 static inline bool classof(const SequentialType *) { return true; }
326321 static inline bool classof(const Type *T) {
327322 return T->getTypeID() == ArrayTyID ||
328323 T->getTypeID() == PointerTyID ||
352347 uint64_t getNumElements() const { return NumElements; }
353348
354349 // Methods for support type inquiry through isa, cast, and dyn_cast.
355 static inline bool classof(const ArrayType *) { return true; }
356350 static inline bool classof(const Type *T) {
357351 return T->getTypeID() == ArrayTyID;
358352 }
419413 }
420414
421415 // Methods for support type inquiry through isa, cast, and dyn_cast.
422 static inline bool classof(const VectorType *) { return true; }
423416 static inline bool classof(const Type *T) {
424417 return T->getTypeID() == VectorTyID;
425418 }
451444 inline unsigned getAddressSpace() const { return getSubclassData(); }
452445
453446 // Implement support type inquiry through isa, cast, and dyn_cast.
454 static inline bool classof(const PointerType *) { return true; }
455447 static inline bool classof(const Type *T) {
456448 return T->getTypeID() == PointerTyID;
457449 }
403403 void viewCFGOnly() const;
404404
405405 /// Methods for support type inquiry through isa, cast, and dyn_cast:
406 static inline bool classof(const Function *) { return true; }
407406 static inline bool classof(const Value *V) {
408407 return V->getValueID() == Value::FunctionVal;
409408 }
7575 const GlobalValue *resolveAliasedGlobal(bool stopOnWeak = true) const;
7676
7777 // Methods for support type inquiry through isa, cast, and dyn_cast:
78 static inline bool classof(const GlobalAlias *) { return true; }
7978 static inline bool classof(const Value *V) {
8079 return V->getValueID() == Value::GlobalAliasVal;
8180 }
286286 inline const Module *getParent() const { return Parent; }
287287
288288 // Methods for support type inquiry through isa, cast, and dyn_cast:
289 static inline bool classof(const GlobalValue *) { return true; }
290289 static inline bool classof(const Value *V) {
291290 return V->getValueID() == Value::FunctionVal ||
292291 V->getValueID() == Value::GlobalVariableVal ||
173173 virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
174174
175175 // Methods for support type inquiry through isa, cast, and dyn_cast:
176 static inline bool classof(const GlobalVariable *) { return true; }
177176 static inline bool classof(const Value *V) {
178177 return V->getValueID() == Value::GlobalVariableVal;
179178 }
188188 }
189189
190190 // Methods for support type inquiry through isa, cast, and dyn_cast:
191 static inline bool classof(const InlineAsm *) { return true; }
192191 static inline bool classof(const Value *V) {
193192 return V->getValueID() == Value::InlineAsmVal;
194193 }
7272 }
7373
7474 // Methods for support type inquiry through isa, cast, and dyn_cast:
75 static inline bool classof(const TerminatorInst *) { return true; }
7675 static inline bool classof(const Instruction *I) {
7776 return I->isTerminator();
7877 }
112111 DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
113112
114113 // Methods for support type inquiry through isa, cast, and dyn_cast:
115 static inline bool classof(const UnaryInstruction *) { return true; }
116114 static inline bool classof(const Instruction *I) {
117115 return I->getOpcode() == Instruction::Alloca ||
118116 I->getOpcode() == Instruction::Load ||
360358 bool isExact() const;
361359
362360 // Methods for support type inquiry through isa, cast, and dyn_cast:
363 static inline bool classof(const BinaryOperator *) { return true; }
364361 static inline bool classof(const Instruction *I) {
365362 return I->isBinaryOp();
366363 }
610607 static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy);
611608
612609 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
613 static inline bool classof(const CastInst *) { return true; }
614610 static inline bool classof(const Instruction *I) {
615611 return I->isCast();
616612 }
815811 static bool isFalseWhenEqual(unsigned short predicate);
816812
817813 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
818 static inline bool classof(const CmpInst *) { return true; }
819814 static inline bool classof(const Instruction *I) {
820815 return I->getOpcode() == Instruction::ICmp ||
821816 I->getOpcode() == Instruction::FCmp;
309309
310310
311311 /// Methods for support type inquiry through isa, cast, and dyn_cast:
312 static inline bool classof(const Instruction *) { return true; }
313312 static inline bool classof(const Value *V) {
314313 return V->getValueID() >= Value::InstructionVal;
315314 }
111111 bool isStaticAlloca() const;
112112
113113 // Methods for support type inquiry through isa, cast, and dyn_cast:
114 static inline bool classof(const AllocaInst *) { return true; }
115114 static inline bool classof(const Instruction *I) {
116115 return (I->getOpcode() == Instruction::Alloca);
117116 }
231230
232231
233232 // Methods for support type inquiry through isa, cast, and dyn_cast:
234 static inline bool classof(const LoadInst *) { return true; }
235233 static inline bool classof(const Instruction *I) {
236234 return I->getOpcode() == Instruction::Load;
237235 }
353351 }
354352
355353 // Methods for support type inquiry through isa, cast, and dyn_cast:
356 static inline bool classof(const StoreInst *) { return true; }
357354 static inline bool classof(const Instruction *I) {
358355 return I->getOpcode() == Instruction::Store;
359356 }
425422 }
426423
427424 // Methods for support type inquiry through isa, cast, and dyn_cast:
428 static inline bool classof(const FenceInst *) { return true; }
429425 static inline bool classof(const Instruction *I) {
430426 return I->getOpcode() == Instruction::Fence;
431427 }
525521 }
526522
527523 // Methods for support type inquiry through isa, cast, and dyn_cast:
528 static inline bool classof(const AtomicCmpXchgInst *) { return true; }
529524 static inline bool classof(const Instruction *I) {
530525 return I->getOpcode() == Instruction::AtomicCmpXchg;
531526 }
669664 }
670665
671666 // Methods for support type inquiry through isa, cast, and dyn_cast:
672 static inline bool classof(const AtomicRMWInst *) { return true; }
673667 static inline bool classof(const Instruction *I) {
674668 return I->getOpcode() == Instruction::AtomicRMW;
675669 }
848842 bool isInBounds() const;
849843
850844 // Methods for support type inquiry through isa, cast, and dyn_cast:
851 static inline bool classof(const GetElementPtrInst *) { return true; }
852845 static inline bool classof(const Instruction *I) {
853846 return (I->getOpcode() == Instruction::GetElementPtr);
854847 }
10301023 }
10311024
10321025 // Methods for support type inquiry through isa, cast, and dyn_cast:
1033 static inline bool classof(const ICmpInst *) { return true; }
10341026 static inline bool classof(const Instruction *I) {
10351027 return I->getOpcode() == Instruction::ICmp;
10361028 }
11401132 }
11411133
11421134 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
1143 static inline bool classof(const FCmpInst *) { return true; }
11441135 static inline bool classof(const Instruction *I) {
11451136 return I->getOpcode() == Instruction::FCmp;
11461137 }
13691360 }
13701361
13711362 // Methods for support type inquiry through isa, cast, and dyn_cast:
1372 static inline bool classof(const CallInst *) { return true; }
13731363 static inline bool classof(const Instruction *I) {
13741364 return I->getOpcode() == Instruction::Call;
13751365 }
14751465 }
14761466
14771467 // Methods for support type inquiry through isa, cast, and dyn_cast:
1478 static inline bool classof(const SelectInst *) { return true; }
14791468 static inline bool classof(const Instruction *I) {
14801469 return I->getOpcode() == Instruction::Select;
14811470 }
15181507 static unsigned getPointerOperandIndex() { return 0U; }
15191508
15201509 // Methods for support type inquiry through isa, cast, and dyn_cast:
1521 static inline bool classof(const VAArgInst *) { return true; }
15221510 static inline bool classof(const Instruction *I) {
15231511 return I->getOpcode() == VAArg;
15241512 }
15721560 DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
15731561
15741562 // Methods for support type inquiry through isa, cast, and dyn_cast:
1575 static inline bool classof(const ExtractElementInst *) { return true; }
15761563 static inline bool classof(const Instruction *I) {
15771564 return I->getOpcode() == Instruction::ExtractElement;
15781565 }
16311618 DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
16321619
16331620 // Methods for support type inquiry through isa, cast, and dyn_cast:
1634 static inline bool classof(const InsertElementInst *) { return true; }
16351621 static inline bool classof(const Instruction *I) {
16361622 return I->getOpcode() == Instruction::InsertElement;
16371623 }
17121698
17131699
17141700 // Methods for support type inquiry through isa, cast, and dyn_cast:
1715 static inline bool classof(const ShuffleVectorInst *) { return true; }
17161701 static inline bool classof(const Instruction *I) {
17171702 return I->getOpcode() == Instruction::ShuffleVector;
17181703 }
18081793 }
18091794
18101795 // Methods for support type inquiry through isa, cast, and dyn_cast:
1811 static inline bool classof(const ExtractValueInst *) { return true; }
18121796 static inline bool classof(const Instruction *I) {
18131797 return I->getOpcode() == Instruction::ExtractValue;
18141798 }
19301914 }
19311915
19321916 // Methods for support type inquiry through isa, cast, and dyn_cast:
1933 static inline bool classof(const InsertValueInst *) { return true; }
19341917 static inline bool classof(const Instruction *I) {
19351918 return I->getOpcode() == Instruction::InsertValue;
19361919 }
21472130 Value *hasConstantValue() const;
21482131
21492132 /// Methods for support type inquiry through isa, cast, and dyn_cast:
2150 static inline bool classof(const PHINode *) { return true; }
21512133 static inline bool classof(const Instruction *I) {
21522134 return I->getOpcode() == Instruction::PHI;
21532135 }
22552237 void reserveClauses(unsigned Size) { growOperands(Size); }
22562238
22572239 // Methods for support type inquiry through isa, cast, and dyn_cast:
2258 static inline bool classof(const LandingPadInst *) { return true; }
22592240 static inline bool classof(const Instruction *I) {
22602241 return I->getOpcode() == Instruction::LandingPad;
22612242 }
23242305 unsigned getNumSuccessors() const { return 0; }
23252306
23262307 // Methods for support type inquiry through isa, cast, and dyn_cast:
2327 static inline bool classof(const ReturnInst *) { return true; }
23282308 static inline bool classof(const Instruction *I) {
23292309 return (I->getOpcode() == Instruction::Ret);
23302310 }
24242404 void swapSuccessors();
24252405
24262406 // Methods for support type inquiry through isa, cast, and dyn_cast:
2427 static inline bool classof(const BranchInst *) { return true; }
24282407 static inline bool classof(const Instruction *I) {
24292408 return (I->getOpcode() == Instruction::Br);
24302409 }
28352814
28362815 // Methods for support type inquiry through isa, cast, and dyn_cast:
28372816
2838 static inline bool classof(const SwitchInst *) { return true; }
28392817 static inline bool classof(const Instruction *I) {
28402818 return I->getOpcode() == Instruction::Switch;
28412819 }
29342912 }
29352913
29362914 // Methods for support type inquiry through isa, cast, and dyn_cast:
2937 static inline bool classof(const IndirectBrInst *) { return true; }
29382915 static inline bool classof(const Instruction *I) {
29392916 return I->getOpcode() == Instruction::IndirectBr;
29402917 }
31533130 unsigned getNumSuccessors() const { return 2; }
31543131
31553132 // Methods for support type inquiry through isa, cast, and dyn_cast:
3156 static inline bool classof(const InvokeInst *) { return true; }
31573133 static inline bool classof(const Instruction *I) {
31583134 return (I->getOpcode() == Instruction::Invoke);
31593135 }
32333209 unsigned getNumSuccessors() const { return 0; }
32343210
32353211 // Methods for support type inquiry through isa, cast, and dyn_cast:
3236 static inline bool classof(const ResumeInst *) { return true; }
32373212 static inline bool classof(const Instruction *I) {
32383213 return I->getOpcode() == Instruction::Resume;
32393214 }
32783253 unsigned getNumSuccessors() const { return 0; }
32793254
32803255 // Methods for support type inquiry through isa, cast, and dyn_cast:
3281 static inline bool classof(const UnreachableInst *) { return true; }
32823256 static inline bool classof(const Instruction *I) {
32833257 return I->getOpcode() == Instruction::Unreachable;
32843258 }
33193293 );
33203294
33213295 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3322 static inline bool classof(const TruncInst *) { return true; }
33233296 static inline bool classof(const Instruction *I) {
33243297 return I->getOpcode() == Trunc;
33253298 }
33563329 );
33573330
33583331 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3359 static inline bool classof(const ZExtInst *) { return true; }
33603332 static inline bool classof(const Instruction *I) {
33613333 return I->getOpcode() == ZExt;
33623334 }
33933365 );
33943366
33953367 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3396 static inline bool classof(const SExtInst *) { return true; }
33973368 static inline bool classof(const Instruction *I) {
33983369 return I->getOpcode() == SExt;
33993370 }
34303401 );
34313402
34323403 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3433 static inline bool classof(const FPTruncInst *) { return true; }
34343404 static inline bool classof(const Instruction *I) {
34353405 return I->getOpcode() == FPTrunc;
34363406 }
34673437 );
34683438
34693439 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3470 static inline bool classof(const FPExtInst *) { return true; }
34713440 static inline bool classof(const Instruction *I) {
34723441 return I->getOpcode() == FPExt;
34733442 }
35043473 );
35053474
35063475 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3507 static inline bool classof(const UIToFPInst *) { return true; }
35083476 static inline bool classof(const Instruction *I) {
35093477 return I->getOpcode() == UIToFP;
35103478 }
35413509 );
35423510
35433511 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3544 static inline bool classof(const SIToFPInst *) { return true; }
35453512 static inline bool classof(const Instruction *I) {
35463513 return I->getOpcode() == SIToFP;
35473514 }
35783545 );
35793546
35803547 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3581 static inline bool classof(const FPToUIInst *) { return true; }
35823548 static inline bool classof(const Instruction *I) {
35833549 return I->getOpcode() == FPToUI;
35843550 }
36153581 );
36163582
36173583 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
3618 static inline bool classof(const FPToSIInst *) { return true; }
36193584 static inline bool classof(const Instruction *I) {
36203585 return I->getOpcode() == FPToSI;
36213586 }
36563621 }
36573622
36583623 // Methods for support type inquiry through isa, cast, and dyn_cast:
3659 static inline bool classof(const IntToPtrInst *) { return true; }
36603624 static inline bool classof(const Instruction *I) {
36613625 return I->getOpcode() == IntToPtr;
36623626 }
36983662 }
36993663
37003664 // Methods for support type inquiry through isa, cast, and dyn_cast:
3701 static inline bool classof(const PtrToIntInst *) { return true; }
37023665 static inline bool classof(const Instruction *I) {
37033666 return I->getOpcode() == PtrToInt;
37043667 }
37353698 );
37363699
37373700 // Methods for support type inquiry through isa, cast, and dyn_cast:
3738 static inline bool classof(const BitCastInst *) { return true; }
37393701 static inline bool classof(const Instruction *I) {
37403702 return I->getOpcode() == BitCast;
37413703 }
4444 }
4545
4646 // Methods for support type inquiry through isa, cast, and dyn_cast:
47 static inline bool classof(const IntrinsicInst *) { return true; }
4847 static inline bool classof(const CallInst *I) {
4948 if (const Function *CF = I->getCalledFunction())
5049 return CF->getIntrinsicID() != 0;
6160 public:
6261
6362 // Methods for support type inquiry through isa, cast, and dyn_cast:
64 static inline bool classof(const DbgInfoIntrinsic *) { return true; }
6563 static inline bool classof(const IntrinsicInst *I) {
6664 switch (I->getIntrinsicID()) {
6765 case Intrinsic::dbg_declare:
8583 MDNode *getVariable() const { return cast(getArgOperand(1)); }
8684
8785 // Methods for support type inquiry through isa, cast, and dyn_cast:
88 static inline bool classof(const DbgDeclareInst *) { return true; }
8986 static inline bool classof(const IntrinsicInst *I) {
9087 return I->getIntrinsicID() == Intrinsic::dbg_declare;
9188 }
107104 MDNode *getVariable() const { return cast(getArgOperand(2)); }
108105
109106 // Methods for support type inquiry through isa, cast, and dyn_cast:
110 static inline bool classof(const DbgValueInst *) { return true; }
111107 static inline bool classof(const IntrinsicInst *I) {
112108 return I->getIntrinsicID() == Intrinsic::dbg_value;
113109 }
174170 }
175171
176172 // Methods for support type inquiry through isa, cast, and dyn_cast:
177 static inline bool classof(const MemIntrinsic *) { return true; }
178173 static inline bool classof(const IntrinsicInst *I) {
179174 switch (I->getIntrinsicID()) {
180175 case Intrinsic::memcpy:
204199 }
205200
206201 // Methods for support type inquiry through isa, cast, and dyn_cast:
207 static inline bool classof(const MemSetInst *) { return true; }
208202 static inline bool classof(const IntrinsicInst *I) {
209203 return I->getIntrinsicID() == Intrinsic::memset;
210204 }
237231 }
238232
239233 // Methods for support type inquiry through isa, cast, and dyn_cast:
240 static inline bool classof(const MemTransferInst *) { return true; }
241234 static inline bool classof(const IntrinsicInst *I) {
242235 return I->getIntrinsicID() == Intrinsic::memcpy ||
243236 I->getIntrinsicID() == Intrinsic::memmove;
253246 class MemCpyInst : public MemTransferInst {
254247 public:
255248 // Methods for support type inquiry through isa, cast, and dyn_cast:
256 static inline bool classof(const MemCpyInst *) { return true; }
257249 static inline bool classof(const IntrinsicInst *I) {
258250 return I->getIntrinsicID() == Intrinsic::memcpy;
259251 }
267259 class MemMoveInst : public MemTransferInst {
268260 public:
269261 // Methods for support type inquiry through isa, cast, and dyn_cast:
270 static inline bool classof(const MemMoveInst *) { return true; }
271262 static inline bool classof(const IntrinsicInst *I) {
272263 return I->getIntrinsicID() == Intrinsic::memmove;
273264 }
9898 unsigned getLayoutOrder() const { return LayoutOrder; }
9999 void setLayoutOrder(unsigned Value) { LayoutOrder = Value; }
100100
101 static bool classof(const MCFragment *O) { return true; }
102
103101 void dump();
104102 };
105103
150148 static bool classof(const MCFragment *F) {
151149 return F->getKind() == MCFragment::FT_Data;
152150 }
153 static bool classof(const MCDataFragment *) { return true; }
154151 };
155152
156153 // FIXME: This current incarnation of MCInstFragment doesn't make much sense, as
212209 static bool classof(const MCFragment *F) {
213210 return F->getKind() == MCFragment::FT_Inst;
214211 }
215 static bool classof(const MCInstFragment *) { return true; }
216212 };
217213
218214 class MCAlignFragment : public MCFragment {
262258 static bool classof(const MCFragment *F) {
263259 return F->getKind() == MCFragment::FT_Align;
264260 }
265 static bool classof(const MCAlignFragment *) { return true; }
266261 };
267262
268263 class MCFillFragment : public MCFragment {
301296 static bool classof(const MCFragment *F) {
302297 return F->getKind() == MCFragment::FT_Fill;
303298 }
304 static bool classof(const MCFillFragment *) { return true; }
305299 };
306300
307301 class MCOrgFragment : public MCFragment {
330324 static bool classof(const MCFragment *F) {
331325 return F->getKind() == MCFragment::FT_Org;
332326 }
333 static bool classof(const MCOrgFragment *) { return true; }
334327 };
335328
336329 class MCLEBFragment : public MCFragment {
363356 static bool classof(const MCFragment *F) {
364357 return F->getKind() == MCFragment::FT_LEB;
365358 }
366 static bool classof(const MCLEBFragment *) { return true; }
367359 };
368360
369361 class MCDwarfLineAddrFragment : public MCFragment {
400392 static bool classof(const MCFragment *F) {
401393 return F->getKind() == MCFragment::FT_Dwarf;
402394 }
403 static bool classof(const MCDwarfLineAddrFragment *) { return true; }
404395 };
405396
406397 class MCDwarfCallFrameFragment : public MCFragment {
430421 static bool classof(const MCFragment *F) {
431422 return F->getKind() == MCFragment::FT_DwarfFrame;
432423 }
433 static bool classof(const MCDwarfCallFrameFragment *) { return true; }
434424 };
435425
436426 // FIXME: Should this be a separate class, or just merged into MCSection? Since
9898 const MCSection *FindAssociatedSection() const;
9999
100100 /// @}
101
102 static bool classof(const MCExpr *) { return true; }
103101 };
104102
105103 inline raw_ostream &operator<<(raw_ostream &OS, const MCExpr &E) {
131129 static bool classof(const MCExpr *E) {
132130 return E->getKind() == MCExpr::Constant;
133131 }
134 static bool classof(const MCConstantExpr *) { return true; }
135132 };
136133
137134 /// MCSymbolRefExpr - Represent a reference to a symbol from inside an
247244 static bool classof(const MCExpr *E) {
248245 return E->getKind() == MCExpr::SymbolRef;
249246 }
250 static bool classof(const MCSymbolRefExpr *) { return true; }
251247 };
252248
253249 /// MCUnaryExpr - Unary assembler expressions.
301297 static bool classof(const MCExpr *E) {
302298 return E->getKind() == MCExpr::Unary;
303299 }
304 static bool classof(const MCUnaryExpr *) { return true; }
305300 };
306301
307302 /// MCBinaryExpr - Binary assembler expressions.
436431 static bool classof(const MCExpr *E) {
437432 return E->getKind() == MCExpr::Binary;
438433 }
439 static bool classof(const MCBinaryExpr *) { return true; }
440434 };
441435
442436 /// MCTargetExpr - This is an extension point for target-specific MCExpr
460454 static bool classof(const MCExpr *E) {
461455 return E->getKind() == MCExpr::Target;
462456 }
463 static bool classof(const MCTargetExpr *) { return true; }
464457 };
465458
466459 } // end namespace llvm
6363 /// isVirtualSection - Check whether this section is "virtual", that is
6464 /// has no actual object file contents.
6565 virtual bool isVirtualSection() const = 0;
66
67 static bool classof(const MCSection *) { return true; }
6866 };
6967
7068 } // end namespace llvm
6060 static bool classof(const MCSection *S) {
6161 return S->getVariant() == SV_COFF;
6262 }
63 static bool classof(const MCSectionCOFF *) { return true; }
6463 };
6564
6665 } // end namespace llvm
7575 static bool classof(const MCSection *S) {
7676 return S->getVariant() == SV_ELF;
7777 }
78 static bool classof(const MCSectionELF *) { return true; }
7978
8079 // Return the entry size for sections with fixed-width data.
8180 static unsigned DetermineEntrySize(SectionKind Kind);
173173 static bool classof(const MCSection *S) {
174174 return S->getVariant() == SV_MachO;
175175 }
176 static bool classof(const MCSectionMachO *) { return true; }
177176 };
178177
179178 } // end namespace llvm
5858 iterator end() const { return getName().end(); }
5959
6060 /// Methods for support type inquiry through isa, cast, and dyn_cast:
61 static inline bool classof(const MDString *) { return true; }
6261 static bool classof(const Value *V) {
6362 return V->getValueID() == MDStringVal;
6463 }
160159 void Profile(FoldingSetNodeID &ID) const;
161160
162161 /// Methods for support type inquiry through isa, cast, and dyn_cast:
163 static inline bool classof(const MDNode *) { return true; }
164162 static bool classof(const Value *V) {
165163 return V->getValueID() == MDNodeVal;
166164 }
128128 symbol_iterator end_symbols() const;
129129
130130 // Cast methods.
131 static inline bool classof(Archive const *v) { return true; }
132131 static inline bool classof(Binary const *v) {
133132 return v->isArchive();
134133 }
6363
6464 // Cast methods.
6565 unsigned int getType() const { return TypeID; }
66 static inline bool classof(const Binary *v) { return true; }
6766
6867 // Convenience methods
6968 bool isObject() const {
197197 static inline bool classof(const Binary *v) {
198198 return v->isCOFF();
199199 }
200 static inline bool classof(const COFFObjectFile *v) { return true; }
201200 };
202201
203202 }
722722 return v->getType() == getELFType(target_endianness == support::little,
723723 is64Bits);
724724 }
725 static inline bool classof(const ELFObjectFile *v) { return true; }
726725 };
727726
728727 // Iterate through the version definitions, and place each Elf_Verdef
4848 static inline bool classof(const Binary *v) {
4949 return v->isMachO();
5050 }
51 static inline bool classof(const MachOObjectFile *v) { return true; }
5251
5352 protected:
5453 virtual error_code getSymbolNext(DataRefImpl Symb, SymbolRef &Res) const;
387387 static inline bool classof(const Binary *v) {
388388 return v->isObject();
389389 }
390 static inline bool classof(const ObjectFile *v) { return true; }
391390
392391 public:
393392 static ObjectFile *createCOFFObjectFile(MemoryBuffer *Object);
5959 return Instruction::UserOp1;
6060 }
6161
62 static inline bool classof(const Operator *) { return true; }
6362 static inline bool classof(const Instruction *) { return true; }
6463 static inline bool classof(const ConstantExpr *) { return true; }
6564 static inline bool classof(const Value *V) {
105104 return (SubclassOptionalData & NoSignedWrap) != 0;
106105 }
107106
108 static inline bool classof(const OverflowingBinaryOperator *) { return true; }
109107 static inline bool classof(const Instruction *I) {
110108 return I->getOpcode() == Instruction::Add ||
111109 I->getOpcode() == Instruction::Sub ||
179177 /// default precision.
180178 float getFPAccuracy() const;
181179
182 static inline bool classof(const FPMathOperator *) { return true; }
183180 static inline bool classof(const Instruction *I) {
184181 return I->getType()->isFPOrFPVectorTy();
185182 }
195192 class ConcreteOperator : public SuperClass {
196193 ~ConcreteOperator() LLVM_DELETED_FUNCTION;
197194 public:
198 static inline bool classof(const ConcreteOperator *) {
199 return true;
200 }
201195 static inline bool classof(const Instruction *I) {
202196 return I->getOpcode() == Opc;
203197 }
132132 virtual void skip() {}
133133
134134 unsigned int getType() const { return TypeID; }
135 static inline bool classof(const Node *) { return true; }
136135
137136 void *operator new ( size_t Size
138137 , BumpPtrAllocator &Alloc
165164 public:
166165 NullNode(OwningPtr &D) : Node(NK_Null, D, StringRef()) {}
167166
168 static inline bool classof(const NullNode *) { return true; }
169167 static inline bool classof(const Node *N) {
170168 return N->getType() == NK_Null;
171169 }
198196 /// This happens with escaped characters and multi-line literals.
199197 StringRef getValue(SmallVectorImpl &Storage) const;
200198
201 static inline bool classof(const ScalarNode *) { return true; }
202199 static inline bool classof(const Node *N) {
203200 return N->getType() == NK_Scalar;
204201 }
245242 getValue()->skip();
246243 }
247244
248 static inline bool classof(const KeyValueNode *) { return true; }
249245 static inline bool classof(const Node *N) {
250246 return N->getType() == NK_KeyValue;
251247 }
361357 yaml::skip(*this);
362358 }
363359
364 static inline bool classof(const MappingNode *) { return true; }
365360 static inline bool classof(const Node *N) {
366361 return N->getType() == NK_Mapping;
367362 }
424419 yaml::skip(*this);
425420 }
426421
427 static inline bool classof(const SequenceNode *) { return true; }
428422 static inline bool classof(const Node *N) {
429423 return N->getType() == NK_Sequence;
430424 }
449443 StringRef getName() const { return Name; }
450444 Node *getTarget();
451445
452 static inline bool classof(const ScalarNode *) { return true; }
453446 static inline bool classof(const Node *N) {
454447 return N->getType() == NK_Alias;
455448 }
8484 virtual void anchor();
8585
8686 public:
87 static bool classof(const RecTy *) { return true; }
8887 RecTyKind getRecTyKind() const { return Kind; }
8988
9089 RecTy(RecTyKind K) : Kind(K), ListTy(0) {}
152151 static BitRecTy Shared;
153152 BitRecTy() : RecTy(BitRecTyKind) {}
154153 public:
155 static bool classof(const BitRecTy *) { return true; }
156154 static bool classof(const RecTy *RT) {
157155 return RT->getRecTyKind() == BitRecTyKind;
158156 }
198196 unsigned Size;
199197 explicit BitsRecTy(unsigned Sz) : RecTy(BitsRecTyKind), Size(Sz) {}
200198 public:
201 static bool classof(const BitsRecTy *) { return true; }
202199 static bool classof(const RecTy *RT) {
203200 return RT->getRecTyKind() == BitsRecTyKind;
204201 }
247244 static IntRecTy Shared;
248245 IntRecTy() : RecTy(IntRecTyKind) {}
249246 public:
250 static bool classof(const IntRecTy *) { return true; }
251247 static bool classof(const RecTy *RT) {
252248 return RT->getRecTyKind() == IntRecTyKind;
253249 }
292288 static StringRecTy Shared;
293289 StringRecTy() : RecTy(StringRecTyKind) {}
294290 public:
295 static bool classof(const StringRecTy *) { return true; }
296291 static bool classof(const RecTy *RT) {
297292 return RT->getRecTyKind() == StringRecTyKind;
298293 }
341336 explicit ListRecTy(RecTy *T) : RecTy(ListRecTyKind), Ty(T) {}
342337 friend ListRecTy *RecTy::getListTy();
343338 public:
344 static bool classof(const ListRecTy *) { return true; }
345339 static bool classof(const RecTy *RT) {
346340 return RT->getRecTyKind() == ListRecTyKind;
347341 }
388382 static DagRecTy Shared;
389383 DagRecTy() : RecTy(DagRecTyKind) {}
390384 public:
391 static bool classof(const DagRecTy *) { return true; }
392385 static bool classof(const RecTy *RT) {
393386 return RT->getRecTyKind() == DagRecTyKind;
394387 }
435428 explicit RecordRecTy(Record *R) : RecTy(RecordRecTyKind), Rec(R) {}
436429 friend class Record;
437430 public:
438 static bool classof(const RecordRecTy *) { return true; }
439431 static bool classof(const RecTy *RT) {
440432 return RT->getRecTyKind() == RecordRecTyKind;
441433 }
388388 static PointerType *getInt32PtrTy(LLVMContext &C, unsigned AS = 0);
389389 static PointerType *getInt64PtrTy(LLVMContext &C, unsigned AS = 0);
390390
391 /// Methods for support type inquiry through isa, cast, and dyn_cast:
392 static inline bool classof(const Type *) { return true; }
393
394391 /// getPointerTo - Return a pointer to the current type. This is equivalent
395392 /// to PointerType::get(Foo, AddrSpace).
396393 PointerType *getPointerTo(unsigned AddrSpace = 0);
175175 void replaceUsesOfWith(Value *From, Value *To);
176176
177177 // Methods for support type inquiry through isa, cast, and dyn_cast:
178 static inline bool classof(const User *) { return true; }
179178 static inline bool classof(const Value *V) {
180179 return isa(V) || isa(V);
181180 }
256256 /// hasValueHandle - Return true if there is a value handle associated with
257257 /// this value.
258258 bool hasValueHandle() const { return HasValueHandle; }
259
260 // Methods for support type inquiry through isa, cast, and dyn_cast:
261 static inline bool classof(const Value *) {
262 return true; // Values are always values.
263 }
264259
265260 /// stripPointerCasts - This method strips off any unneeded pointer casts and
266261 /// all-zero GEPs from the specified value, returning the original uncasted
210210 }
211211
212212 /// @brief Methods to support type inquiry through isa, cast, and dyn_cast.
213 //static inline bool classof(const ConstantPlaceHolder *) { return true; }
214213 static bool classof(const Value *V) {
215214 return isa(V) &&
216215 cast(V)->getOpcode() == Instruction::UserOp1;
213213 ///
214214 virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const = 0;
215215
216 // Implement isa/cast/dyncast.
217 static bool classof(const DIEValue *) { return true; }
218
219216 #ifndef NDEBUG
220217 virtual void print(raw_ostream &O) = 0;
221218 void dump();
256253 virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const;
257254
258255 // Implement isa/cast/dyncast.
259 static bool classof(const DIEInteger *) { return true; }
260256 static bool classof(const DIEValue *I) { return I->getType() == isInteger; }
261257
262258 #ifndef NDEBUG
285281 virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const;
286282
287283 // Implement isa/cast/dyncast.
288 static bool classof(const DIELabel *) { return true; }
289284 static bool classof(const DIEValue *L) { return L->getType() == isLabel; }
290285
291286 #ifndef NDEBUG
312307 virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const;
313308
314309 // Implement isa/cast/dyncast.
315 static bool classof(const DIEDelta *) { return true; }
316310 static bool classof(const DIEValue *D) { return D->getType() == isDelta; }
317311
318312 #ifndef NDEBUG
342336 }
343337
344338 // Implement isa/cast/dyncast.
345 static bool classof(const DIEEntry *) { return true; }
346339 static bool classof(const DIEValue *E) { return E->getType() == isEntry; }
347340
348341 #ifndef NDEBUG
382375 virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const;
383376
384377 // Implement isa/cast/dyncast.
385 static bool classof(const DIEBlock *) { return true; }
386378 static bool classof(const DIEValue *E) { return E->getType() == isBlock; }
387379
388380 #ifndef NDEBUG
5757 static inline bool classof(
5858 const ELFObjectFile *v) {
5959 return v->isDyldType();
60 }
61 static inline bool classof(const DyldELFObject *v) {
62 return true;
6360 }
6461 };
6562
101101 virtual void print(raw_ostream &O) const;
102102 void print(raw_ostream *O) const { if (O) print(*O); }
103103 void dump() const;
104
105 static bool classof(const ARMConstantPoolValue *) { return true; }
106104 };
107105
108106 inline raw_ostream &operator<<(raw_ostream &O, const ARMConstantPoolValue &V) {
157155 static bool classof(const ARMConstantPoolValue *APV) {
158156 return APV->isGlobalValue() || APV->isBlockAddress() || APV->isLSDA();
159157 }
160 static bool classof(const ARMConstantPoolConstant *) { return true; }
161158 };
162159
163160 /// ARMConstantPoolSymbol - ARM-specific constantpool values for external
191188 static bool classof(const ARMConstantPoolValue *ACPV) {
192189 return ACPV->isExtSymbol();
193190 }
194 static bool classof(const ARMConstantPoolSymbol *) { return true; }
195191 };
196192
197193 /// ARMConstantPoolMBB - ARM-specific constantpool value of a machine basic
224220 static bool classof(const ARMConstantPoolValue *ACPV) {
225221 return ACPV->isMachineBasicBlock();
226222 }
227 static bool classof(const ARMConstantPoolMBB *) { return true; }
228223 };
229224
230225 } // End llvm namespace
6666 static bool classof(const MCExpr *E) {
6767 return E->getKind() == MCExpr::Target;
6868 }
69
70 static bool classof(const ARMMCExpr *) { return true; }
71
7269 };
7370 } // end namespace llvm
7471
9797 Matcher *takeNext() { return Next.take(); }
9898
9999 OwningPtr &getNextPtr() { return Next; }
100
101 static inline bool classof(const Matcher *) { return true; }
102100
103101 bool isEqual(const Matcher *M) const {
104102 if (getKind() != M->getKind()) return false;