diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index 911ae1031fc..689805a5c11 100644 --- a/include/llvm/IntrinsicInst.h +++ b/include/llvm/IntrinsicInst.h @@ -42,6 +42,33 @@ namespace llvm { static Value *StripPointerCasts(Value *Ptr); }; + /// DbgStopPointInst - This represent llvm.dbg.stoppoint instructions. + /// + struct DbgStopPointInst : public IntrinsicInst { + + Value *getChain() const { return const_cast(getOperand(1)); } + unsigned getLineNo() const { + return cast(getOperand(2))->getRawValue(); + } + unsigned getColNo() const { + return cast(getOperand(3))->getRawValue(); + } + Value *getContext() const { return const_cast(getOperand(4)); } + + + // Methods for support type inquiry through isa, cast, and dyn_cast: + static inline bool classof(const DbgStopPointInst *) { return true; } + static inline bool classof(const CallInst *I) { + if (const Function *CF = I->getCalledFunction()) + return CF->getIntrinsicID() == Intrinsic::dbg_stoppoint; + return false; + } + static inline bool classof(const Value *V) { + return isa(V) && classof(cast(V)); + } + }; + + /// MemIntrinsic - This is the common base class for memset/memcpy/memmove. ///