2002-09-10 17:36:11 +02:00
|
|
|
//===-- llvm/iTerminators.h - Termintator instruction nodes -----*- C++ -*-===//
|
2003-10-20 22:19:47 +02:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2001-06-06 22:29:01 +02:00
|
|
|
//
|
2002-09-10 17:36:11 +02:00
|
|
|
// This file contains the declarations for all the subclasses of the Instruction
|
|
|
|
// class which represent "terminator" instructions. Terminator instructions are
|
|
|
|
// the only instructions allowed and required to terminate a BasicBlock.
|
2001-06-06 22:29:01 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ITERMINATORS_H
|
|
|
|
#define LLVM_ITERMINATORS_H
|
|
|
|
|
|
|
|
#include "llvm/InstrTypes.h"
|
|
|
|
|
2003-11-11 23:41:34 +01:00
|
|
|
namespace llvm {
|
|
|
|
|
2001-06-06 22:29:01 +02:00
|
|
|
//===---------------------------------------------------------------------------
|
2003-06-19 19:03:00 +02:00
|
|
|
// ReturnInst - Return a value (possibly void), from a function. Execution does
|
|
|
|
// not continue in this function any longer.
|
2001-06-06 22:29:01 +02:00
|
|
|
//
|
|
|
|
class ReturnInst : public TerminatorInst {
|
2001-07-07 10:36:50 +02:00
|
|
|
ReturnInst(const ReturnInst &RI) : TerminatorInst(Instruction::Ret) {
|
|
|
|
if (RI.Operands.size()) {
|
|
|
|
assert(RI.Operands.size() == 1 && "Return insn can only have 1 operand!");
|
|
|
|
Operands.reserve(1);
|
|
|
|
Operands.push_back(Use(RI.Operands[0], this));
|
|
|
|
}
|
|
|
|
}
|
2001-06-06 22:29:01 +02:00
|
|
|
public:
|
2003-11-20 18:44:37 +01:00
|
|
|
// ReturnInst constructors:
|
|
|
|
// ReturnInst() - 'ret void' instruction
|
|
|
|
// ReturnInst(Value* X) - 'ret X' instruction
|
|
|
|
// ReturnInst( null, Inst *) - 'ret void' instruction, insert before I
|
|
|
|
// ReturnInst(Value* X, Inst *I) - 'ret X' instruction, insert before I
|
|
|
|
// ReturnInst( null, BB *B) - 'ret void' instruction, insert @ end of BB
|
|
|
|
// ReturnInst(Value* X, BB *B) - 'ret X' instruction, insert @ end of BB
|
2002-09-10 17:36:11 +02:00
|
|
|
ReturnInst(Value *RetVal = 0, Instruction *InsertBefore = 0)
|
|
|
|
: TerminatorInst(Instruction::Ret, InsertBefore) {
|
2001-07-07 10:36:50 +02:00
|
|
|
if (RetVal) {
|
|
|
|
Operands.reserve(1);
|
|
|
|
Operands.push_back(Use(RetVal, this));
|
|
|
|
}
|
|
|
|
}
|
2003-11-20 18:44:37 +01:00
|
|
|
ReturnInst(Value *RetVal, BasicBlock *InsertAtEnd)
|
|
|
|
: TerminatorInst(Instruction::Ret, InsertAtEnd) {
|
|
|
|
if (RetVal) {
|
|
|
|
Operands.reserve(1);
|
|
|
|
Operands.push_back(Use(RetVal, this));
|
|
|
|
}
|
|
|
|
}
|
2001-06-06 22:29:01 +02:00
|
|
|
|
|
|
|
virtual Instruction *clone() const { return new ReturnInst(*this); }
|
|
|
|
|
2001-07-07 10:36:50 +02:00
|
|
|
inline const Value *getReturnValue() const {
|
2001-10-13 08:14:53 +02:00
|
|
|
return Operands.size() ? Operands[0].get() : 0;
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
|
|
|
inline Value *getReturnValue() {
|
2001-10-13 08:14:53 +02:00
|
|
|
return Operands.size() ? Operands[0].get() : 0;
|
2001-06-06 22:29:01 +02:00
|
|
|
}
|
|
|
|
|
2002-04-27 05:14:12 +02:00
|
|
|
virtual const BasicBlock *getSuccessor(unsigned idx) const {
|
|
|
|
assert(0 && "ReturnInst has no successors!");
|
2002-05-10 20:53:21 +02:00
|
|
|
abort();
|
2002-07-25 17:39:05 +02:00
|
|
|
return 0;
|
2002-04-27 05:14:12 +02:00
|
|
|
}
|
2003-11-20 18:44:37 +01:00
|
|
|
virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc);
|
2001-06-06 22:29:01 +02:00
|
|
|
virtual unsigned getNumSuccessors() const { return 0; }
|
2001-10-02 05:41:24 +02:00
|
|
|
|
|
|
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
|
|
static inline bool classof(const ReturnInst *) { return true; }
|
|
|
|
static inline bool classof(const Instruction *I) {
|
|
|
|
return (I->getOpcode() == Instruction::Ret);
|
|
|
|
}
|
|
|
|
static inline bool classof(const Value *V) {
|
|
|
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
|
|
|
}
|
2001-06-06 22:29:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
//===---------------------------------------------------------------------------
|
|
|
|
// BranchInst - Conditional or Unconditional Branch instruction.
|
|
|
|
//
|
|
|
|
class BranchInst : public TerminatorInst {
|
|
|
|
BranchInst(const BranchInst &BI);
|
|
|
|
public:
|
2003-11-20 18:44:37 +01:00
|
|
|
// BranchInst constructors (where {B, T, F} are blocks, and C is a condition):
|
|
|
|
// BranchInst(BB *B) - 'br B'
|
|
|
|
// BranchInst(BB* T, BB *F, Value *C) - 'br C, T, F'
|
|
|
|
// BranchInst(BB* B, Inst *I) - 'br B' insert before I
|
|
|
|
// BranchInst(BB* T, BB *F, Value *C, Inst *I) - 'br C, T, F', insert before I
|
|
|
|
// BranchInst(BB* B, BB *I) - 'br B' insert at end
|
|
|
|
// BranchInst(BB* T, BB *F, Value *C, BB *I) - 'br C, T, F', insert at end
|
2002-09-11 01:54:56 +02:00
|
|
|
BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore = 0);
|
2003-11-20 18:44:37 +01:00
|
|
|
BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *cond,
|
|
|
|
Instruction *InsertBefore = 0);
|
|
|
|
BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd);
|
|
|
|
BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *cond,
|
|
|
|
BasicBlock *InsertAtEnd);
|
2001-06-06 22:29:01 +02:00
|
|
|
|
|
|
|
virtual Instruction *clone() const { return new BranchInst(*this); }
|
|
|
|
|
2002-04-27 05:14:12 +02:00
|
|
|
inline bool isUnconditional() const { return Operands.size() == 1; }
|
|
|
|
inline bool isConditional() const { return Operands.size() == 3; }
|
2001-07-07 10:36:50 +02:00
|
|
|
|
2003-06-04 07:08:31 +02:00
|
|
|
inline Value *getCondition() const {
|
2003-11-16 21:21:15 +01:00
|
|
|
return isUnconditional() ? 0 : reinterpret_cast<Value*>(Operands[2].get());
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
2003-06-04 07:08:31 +02:00
|
|
|
|
|
|
|
void setCondition(Value *V) {
|
|
|
|
assert(isConditional() && "Cannot set condition of unconditional branch!");
|
|
|
|
setOperand(2, V);
|
2001-06-06 22:29:01 +02:00
|
|
|
}
|
|
|
|
|
2001-07-07 10:36:50 +02:00
|
|
|
// setUnconditionalDest - Change the current branch to an unconditional branch
|
|
|
|
// targeting the specified block.
|
|
|
|
//
|
|
|
|
void setUnconditionalDest(BasicBlock *Dest) {
|
2002-04-27 05:14:12 +02:00
|
|
|
if (isConditional()) Operands.erase(Operands.begin()+1, Operands.end());
|
2003-11-16 21:21:15 +01:00
|
|
|
Operands[0] = reinterpret_cast<Value*>(Dest);
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual const BasicBlock *getSuccessor(unsigned i) const {
|
2002-04-27 05:14:12 +02:00
|
|
|
assert(i < getNumSuccessors() && "Successor # out of range for Branch!");
|
2002-04-09 20:36:05 +02:00
|
|
|
return (i == 0) ? cast<BasicBlock>(Operands[0].get()) :
|
2002-04-27 05:14:12 +02:00
|
|
|
cast<BasicBlock>(Operands[1].get());
|
2001-06-06 22:29:01 +02:00
|
|
|
}
|
2001-06-28 01:29:41 +02:00
|
|
|
inline BasicBlock *getSuccessor(unsigned idx) {
|
2003-11-16 21:21:15 +01:00
|
|
|
const BranchInst *BI = this;
|
|
|
|
return const_cast<BasicBlock*>(BI->getSuccessor(idx));
|
2001-06-28 01:29:41 +02:00
|
|
|
}
|
2001-06-06 22:29:01 +02:00
|
|
|
|
2002-05-23 17:48:41 +02:00
|
|
|
virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
|
|
|
|
assert(idx < getNumSuccessors() && "Successor # out of range for Branch!");
|
2003-11-16 21:21:15 +01:00
|
|
|
Operands[idx] = reinterpret_cast<Value*>(NewSucc);
|
2002-05-23 17:48:41 +02:00
|
|
|
}
|
|
|
|
|
2002-04-27 05:14:12 +02:00
|
|
|
virtual unsigned getNumSuccessors() const { return 1+isConditional(); }
|
2001-10-02 05:41:24 +02:00
|
|
|
|
|
|
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
|
|
static inline bool classof(const BranchInst *) { return true; }
|
|
|
|
static inline bool classof(const Instruction *I) {
|
|
|
|
return (I->getOpcode() == Instruction::Br);
|
|
|
|
}
|
|
|
|
static inline bool classof(const Value *V) {
|
|
|
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
|
|
|
}
|
2001-06-06 22:29:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//===---------------------------------------------------------------------------
|
|
|
|
// SwitchInst - Multiway switch
|
|
|
|
//
|
|
|
|
class SwitchInst : public TerminatorInst {
|
2001-07-07 20:42:52 +02:00
|
|
|
// Operand[0] = Value to switch on
|
|
|
|
// Operand[1] = Default basic block destination
|
|
|
|
// Operand[2n ] = Value to match
|
|
|
|
// Operand[2n+1] = BasicBlock to go to on match
|
2001-06-06 22:29:01 +02:00
|
|
|
SwitchInst(const SwitchInst &RI);
|
|
|
|
public:
|
2002-09-10 17:36:11 +02:00
|
|
|
SwitchInst(Value *Value, BasicBlock *Default, Instruction *InsertBefore = 0);
|
2003-11-20 18:44:37 +01:00
|
|
|
SwitchInst(Value *Value, BasicBlock *Default, BasicBlock *InsertAtEnd);
|
2001-06-06 22:29:01 +02:00
|
|
|
|
|
|
|
virtual Instruction *clone() const { return new SwitchInst(*this); }
|
|
|
|
|
2001-06-28 01:29:41 +02:00
|
|
|
// Accessor Methods for Switch stmt
|
|
|
|
//
|
2001-07-07 10:36:50 +02:00
|
|
|
inline const Value *getCondition() const { return Operands[0]; }
|
|
|
|
inline Value *getCondition() { return Operands[0]; }
|
|
|
|
inline const BasicBlock *getDefaultDest() const {
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[1].get());
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
|
|
|
inline BasicBlock *getDefaultDest() {
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[1].get());
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
2001-06-28 01:29:41 +02:00
|
|
|
|
2003-08-24 01:14:37 +02:00
|
|
|
/// addCase - Add an entry to the switch instruction...
|
|
|
|
///
|
|
|
|
void addCase(Constant *OnVal, BasicBlock *Dest);
|
|
|
|
|
|
|
|
/// removeCase - This method removes the specified successor from the switch
|
|
|
|
/// instruction. Note that this cannot be used to remove the default
|
|
|
|
/// destination (successor #0).
|
|
|
|
///
|
|
|
|
void removeCase(unsigned idx);
|
2001-06-06 22:29:01 +02:00
|
|
|
|
2001-07-07 10:36:50 +02:00
|
|
|
virtual const BasicBlock *getSuccessor(unsigned idx) const {
|
2002-04-27 05:14:12 +02:00
|
|
|
assert(idx < getNumSuccessors() &&"Successor idx out of range for switch!");
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[idx*2+1].get());
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
2001-06-28 01:29:41 +02:00
|
|
|
inline BasicBlock *getSuccessor(unsigned idx) {
|
2002-04-27 05:14:12 +02:00
|
|
|
assert(idx < getNumSuccessors() &&"Successor idx out of range for switch!");
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[idx*2+1].get());
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
|
|
|
|
2002-05-23 17:48:41 +02:00
|
|
|
virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
|
|
|
|
assert(idx < getNumSuccessors() && "Successor # out of range for switch!");
|
2003-11-16 21:21:15 +01:00
|
|
|
Operands[idx*2+1] = reinterpret_cast<Value*>(NewSucc);
|
2002-05-23 17:48:41 +02:00
|
|
|
}
|
|
|
|
|
2001-07-07 20:42:52 +02:00
|
|
|
// getSuccessorValue - Return the value associated with the specified
|
2002-04-27 05:14:12 +02:00
|
|
|
// successor.
|
2001-12-03 23:26:30 +01:00
|
|
|
inline const Constant *getSuccessorValue(unsigned idx) const {
|
2001-07-07 10:36:50 +02:00
|
|
|
assert(idx < getNumSuccessors() && "Successor # out of range!");
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<Constant>(Operands[idx*2].get());
|
2001-07-07 10:36:50 +02:00
|
|
|
}
|
2001-12-03 23:26:30 +01:00
|
|
|
inline Constant *getSuccessorValue(unsigned idx) {
|
2001-07-07 10:36:50 +02:00
|
|
|
assert(idx < getNumSuccessors() && "Successor # out of range!");
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<Constant>(Operands[idx*2].get());
|
2001-06-28 01:29:41 +02:00
|
|
|
}
|
2001-07-07 10:36:50 +02:00
|
|
|
virtual unsigned getNumSuccessors() const { return Operands.size()/2; }
|
2001-10-02 05:41:24 +02:00
|
|
|
|
|
|
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
|
|
static inline bool classof(const SwitchInst *) { return true; }
|
|
|
|
static inline bool classof(const Instruction *I) {
|
|
|
|
return (I->getOpcode() == Instruction::Switch);
|
|
|
|
}
|
|
|
|
static inline bool classof(const Value *V) {
|
|
|
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
|
|
|
}
|
2001-06-06 22:29:01 +02:00
|
|
|
};
|
|
|
|
|
2001-10-13 08:14:53 +02:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------------
|
|
|
|
// InvokeInst - Invoke instruction
|
|
|
|
//
|
|
|
|
class InvokeInst : public TerminatorInst {
|
|
|
|
InvokeInst(const InvokeInst &BI);
|
|
|
|
public:
|
2003-06-19 19:03:00 +02:00
|
|
|
InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
|
2002-09-10 17:36:11 +02:00
|
|
|
const std::vector<Value*> &Params, const std::string &Name = "",
|
|
|
|
Instruction *InsertBefore = 0);
|
2003-11-20 18:44:37 +01:00
|
|
|
InvokeInst(Value *Fn, BasicBlock *IfNormal, BasicBlock *IfException,
|
|
|
|
const std::vector<Value*> &Params, const std::string &Name,
|
|
|
|
BasicBlock *InsertAtEnd);
|
2001-10-13 08:14:53 +02:00
|
|
|
|
|
|
|
virtual Instruction *clone() const { return new InvokeInst(*this); }
|
|
|
|
|
2003-02-24 21:48:32 +01:00
|
|
|
bool mayWriteToMemory() const { return true; }
|
2002-05-14 06:20:25 +02:00
|
|
|
|
2003-10-31 18:51:16 +01:00
|
|
|
/// getCalledFunction - Return the function called, or null if this is an
|
|
|
|
/// indirect function invocation...
|
|
|
|
///
|
|
|
|
/// FIXME: These should be inlined once we get rid of ConstantPointerRefs!
|
|
|
|
///
|
|
|
|
const Function *getCalledFunction() const;
|
|
|
|
Function *getCalledFunction();
|
2001-10-13 08:14:53 +02:00
|
|
|
|
2003-06-19 19:03:00 +02:00
|
|
|
// getCalledValue - Get a pointer to a function that is invoked by this inst.
|
2001-10-13 08:14:53 +02:00
|
|
|
inline const Value *getCalledValue() const { return Operands[0]; }
|
|
|
|
inline Value *getCalledValue() { return Operands[0]; }
|
|
|
|
|
|
|
|
// get*Dest - Return the destination basic blocks...
|
|
|
|
inline const BasicBlock *getNormalDest() const {
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[1].get());
|
2001-10-13 08:14:53 +02:00
|
|
|
}
|
|
|
|
inline BasicBlock *getNormalDest() {
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[1].get());
|
2001-10-13 08:14:53 +02:00
|
|
|
}
|
2004-02-08 22:44:31 +01:00
|
|
|
inline const BasicBlock *getUnwindDest() const {
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[2].get());
|
2001-10-13 08:14:53 +02:00
|
|
|
}
|
2004-02-08 22:44:31 +01:00
|
|
|
inline BasicBlock *getUnwindDest() {
|
2002-04-09 20:36:05 +02:00
|
|
|
return cast<BasicBlock>(Operands[2].get());
|
2001-10-13 08:14:53 +02:00
|
|
|
}
|
|
|
|
|
2002-06-25 22:17:40 +02:00
|
|
|
inline void setNormalDest(BasicBlock *B){
|
2003-11-16 21:21:15 +01:00
|
|
|
Operands[1] = reinterpret_cast<Value*>(B);
|
2002-06-25 22:17:40 +02:00
|
|
|
}
|
|
|
|
|
2004-02-08 22:44:31 +01:00
|
|
|
inline void setUnwindDest(BasicBlock *B){
|
2003-11-16 21:21:15 +01:00
|
|
|
Operands[2] = reinterpret_cast<Value*>(B);
|
2002-06-25 22:17:40 +02:00
|
|
|
}
|
|
|
|
|
2001-10-13 08:14:53 +02:00
|
|
|
virtual const BasicBlock *getSuccessor(unsigned i) const {
|
2002-04-27 05:14:12 +02:00
|
|
|
assert(i < 2 && "Successor # out of range for invoke!");
|
2004-02-08 22:44:31 +01:00
|
|
|
return i == 0 ? getNormalDest() : getUnwindDest();
|
2001-10-13 08:14:53 +02:00
|
|
|
}
|
|
|
|
inline BasicBlock *getSuccessor(unsigned i) {
|
2002-04-27 05:14:12 +02:00
|
|
|
assert(i < 2 && "Successor # out of range for invoke!");
|
2004-02-08 22:44:31 +01:00
|
|
|
return i == 0 ? getNormalDest() : getUnwindDest();
|
2001-10-13 08:14:53 +02:00
|
|
|
}
|
|
|
|
|
2002-05-23 17:48:41 +02:00
|
|
|
virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
|
|
|
|
assert(idx < 2 && "Successor # out of range for invoke!");
|
2003-11-16 21:21:15 +01:00
|
|
|
Operands[idx+1] = reinterpret_cast<Value*>(NewSucc);
|
2002-05-23 17:48:41 +02:00
|
|
|
}
|
|
|
|
|
2001-10-13 08:14:53 +02:00
|
|
|
virtual unsigned getNumSuccessors() const { return 2; }
|
|
|
|
|
|
|
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
|
|
static inline bool classof(const InvokeInst *) { return true; }
|
|
|
|
static inline bool classof(const Instruction *I) {
|
|
|
|
return (I->getOpcode() == Instruction::Invoke);
|
|
|
|
}
|
|
|
|
static inline bool classof(const Value *V) {
|
|
|
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2003-09-08 20:54:09 +02:00
|
|
|
|
|
|
|
//===---------------------------------------------------------------------------
|
|
|
|
/// UnwindInst - Immediately exit the current function, unwinding the stack
|
|
|
|
/// until an invoke instruction is found.
|
|
|
|
///
|
|
|
|
struct UnwindInst : public TerminatorInst {
|
|
|
|
UnwindInst(Instruction *InsertBefore = 0)
|
|
|
|
: TerminatorInst(Instruction::Unwind, InsertBefore) {
|
|
|
|
}
|
2003-11-20 19:11:56 +01:00
|
|
|
UnwindInst(BasicBlock *InsertAtEnd)
|
|
|
|
: TerminatorInst(Instruction::Unwind, InsertAtEnd) {
|
|
|
|
}
|
2003-09-08 20:54:09 +02:00
|
|
|
|
|
|
|
virtual Instruction *clone() const { return new UnwindInst(); }
|
|
|
|
|
|
|
|
virtual const BasicBlock *getSuccessor(unsigned idx) const {
|
|
|
|
assert(0 && "UnwindInst has no successors!");
|
|
|
|
abort();
|
|
|
|
return 0;
|
|
|
|
}
|
2003-11-20 19:11:56 +01:00
|
|
|
virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc);
|
2003-09-08 20:54:09 +02:00
|
|
|
virtual unsigned getNumSuccessors() const { return 0; }
|
|
|
|
|
|
|
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
|
|
static inline bool classof(const UnwindInst *) { return true; }
|
|
|
|
static inline bool classof(const Instruction *I) {
|
|
|
|
return I->getOpcode() == Instruction::Unwind;
|
|
|
|
}
|
|
|
|
static inline bool classof(const Value *V) {
|
|
|
|
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2003-11-11 23:41:34 +01:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2001-06-06 22:29:01 +02:00
|
|
|
#endif
|