aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IntrinsicInst.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IntrinsicInst.h')
-rw-r--r--include/llvm/IntrinsicInst.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h
index a502cc27bc..b8480551b5 100644
--- a/include/llvm/IntrinsicInst.h
+++ b/include/llvm/IntrinsicInst.h
@@ -25,7 +25,6 @@
#define LLVM_INTRINSICINST_H
#include "llvm/Constants.h"
-#include "llvm/Metadata.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
@@ -86,8 +85,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)); }
- MDNode *getContext() const {
- return cast<MDNode>(getOperand(3));
+ Value *getContext() const {
+ return StripCast(getOperand(3));
}
unsigned getLine() const {
@@ -113,7 +112,7 @@ namespace llvm {
/// DbgFuncStartInst - This represents the llvm.dbg.func.start instruction.
///
struct DbgFuncStartInst : public DbgInfoIntrinsic {
- MDNode *getSubprogram() const { return cast<MDNode>(getOperand(1)); }
+ Value *getSubprogram() const { return StripCast(getOperand(1)); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgFuncStartInst *) { return true; }
@@ -128,7 +127,7 @@ namespace llvm {
/// DbgRegionStartInst - This represents the llvm.dbg.region.start
/// instruction.
struct DbgRegionStartInst : public DbgInfoIntrinsic {
- MDNode *getContext() const { return cast<MDNode>(getOperand(1)); }
+ Value *getContext() const { return StripCast(getOperand(1)); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgRegionStartInst *) { return true; }
@@ -143,7 +142,7 @@ namespace llvm {
/// DbgRegionEndInst - This represents the llvm.dbg.region.end instruction.
///
struct DbgRegionEndInst : public DbgInfoIntrinsic {
- MDNode *getContext() const { return cast<MDNode>(getOperand(1)); }
+ Value *getContext() const { return StripCast(getOperand(1)); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgRegionEndInst *) { return true; }
@@ -159,7 +158,7 @@ namespace llvm {
///
struct DbgDeclareInst : public DbgInfoIntrinsic {
Value *getAddress() const { return getOperand(1); }
- MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); }
+ Value *getVariable() const { return StripCast(getOperand(2)); }
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const DbgDeclareInst *) { return true; }