summaryrefslogtreecommitdiff
path: root/include/llvm/IntrinsicInst.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-18 21:41:16 +0000
committerChris Lattner <sabre@nondot.org>2004-11-18 21:41:16 +0000
commit1085548d35ccaf5e90e001b5c2af8cc311872f15 (patch)
tree84929b6c910b3d8c47f0c39c4d075162646fed6f /include/llvm/IntrinsicInst.h
parentf67fb1931c4cb68c1d847170db5f7ff86dbe132a (diff)
downloadllvm-1085548d35ccaf5e90e001b5c2af8cc311872f15.tar.gz
llvm-1085548d35ccaf5e90e001b5c2af8cc311872f15.tar.bz2
llvm-1085548d35ccaf5e90e001b5c2af8cc311872f15.tar.xz
Add support for llvm.dbg.stoppoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IntrinsicInst.h')
-rw-r--r--include/llvm/IntrinsicInst.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h
index 911ae1031f..689805a5c1 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<Value*>(getOperand(1)); }
+ unsigned getLineNo() const {
+ return cast<ConstantInt>(getOperand(2))->getRawValue();
+ }
+ unsigned getColNo() const {
+ return cast<ConstantInt>(getOperand(3))->getRawValue();
+ }
+ Value *getContext() const { return const_cast<Value*>(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<CallInst>(V) && classof(cast<CallInst>(V));
+ }
+ };
+
+
/// MemIntrinsic - This is the common base class for memset/memcpy/memmove.
///