Add support for llvm.dbg.stoppoint
authorChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2004 21:41:16 +0000 (21:41 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2004 21:41:16 +0000 (21:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17969 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IntrinsicInst.h

index 911ae1031fc785e4e0d055497190f8ba01faac3c..689805a5c115a713127f960bb119c6fafbbd86d5 100644 (file)
@@ -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.
   ///