diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-28 23:24:31 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-28 23:24:31 +0000 |
commit | e4b275610a7a05b7ee4c0378a906a6330e4c4ab0 (patch) | |
tree | ad839c82009fa9220c9934db785cfa5ee35c9d25 /include/llvm/IntrinsicInst.h | |
parent | e4e4ed3b56f63e9343e01bf0b2ecd7c1f45d296c (diff) | |
download | llvm-e4b275610a7a05b7ee4c0378a906a6330e4c4ab0.tar.gz llvm-e4b275610a7a05b7ee4c0378a906a6330e4c4ab0.tar.bz2 llvm-e4b275610a7a05b7ee4c0378a906a6330e4c4ab0.tar.xz |
Reapply 79977.
Use MDNodes to encode debug info in llvm IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IntrinsicInst.h')
-rw-r--r-- | include/llvm/IntrinsicInst.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index b8480551b5..a502cc27bc 100644 --- a/include/llvm/IntrinsicInst.h +++ b/include/llvm/IntrinsicInst.h @@ -25,6 +25,7 @@ #define LLVM_INTRINSICINST_H #include "llvm/Constants.h" +#include "llvm/Metadata.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" @@ -85,8 +86,8 @@ namespace llvm { struct DbgStopPointInst : public DbgInfoIntrinsic { Value *getLineValue() const { return const_cast<Value*>(getOperand(1)); } Value *getColumnValue() const { return const_cast<Value*>(getOperand(2)); } - Value *getContext() const { - return StripCast(getOperand(3)); + MDNode *getContext() const { + return cast<MDNode>(getOperand(3)); } unsigned getLine() const { @@ -112,7 +113,7 @@ namespace llvm { /// DbgFuncStartInst - This represents the llvm.dbg.func.start instruction. /// struct DbgFuncStartInst : public DbgInfoIntrinsic { - Value *getSubprogram() const { return StripCast(getOperand(1)); } + MDNode *getSubprogram() const { return cast<MDNode>(getOperand(1)); } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const DbgFuncStartInst *) { return true; } @@ -127,7 +128,7 @@ namespace llvm { /// DbgRegionStartInst - This represents the llvm.dbg.region.start /// instruction. struct DbgRegionStartInst : public DbgInfoIntrinsic { - Value *getContext() const { return StripCast(getOperand(1)); } + MDNode *getContext() const { return cast<MDNode>(getOperand(1)); } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const DbgRegionStartInst *) { return true; } @@ -142,7 +143,7 @@ namespace llvm { /// DbgRegionEndInst - This represents the llvm.dbg.region.end instruction. /// struct DbgRegionEndInst : public DbgInfoIntrinsic { - Value *getContext() const { return StripCast(getOperand(1)); } + MDNode *getContext() const { return cast<MDNode>(getOperand(1)); } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const DbgRegionEndInst *) { return true; } @@ -158,7 +159,7 @@ namespace llvm { /// struct DbgDeclareInst : public DbgInfoIntrinsic { Value *getAddress() const { return getOperand(1); } - Value *getVariable() const { return StripCast(getOperand(2)); } + MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); } // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const DbgDeclareInst *) { return true; } |