diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /include/llvm/IntrinsicInst.h | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'include/llvm/IntrinsicInst.h')
-rw-r--r-- | include/llvm/IntrinsicInst.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index 8f5e05f..6a8f376 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; } @@ -202,9 +203,13 @@ namespace llvm { "setLength called with value of wrong type!"); setOperand(3, L); } - void setAlignment(unsigned A) { - const Type *Int32Ty = getOperand(4)->getType(); - setOperand(4, ConstantInt::get(Int32Ty, A)); + + void setAlignment(Constant* A) { + setOperand(4, A); + } + + const Type *getAlignmentType() const { + return getOperand(4)->getType(); } // Methods for support type inquiry through isa, cast, and dyn_cast: @@ -308,8 +313,7 @@ namespace llvm { // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const EHSelectorInst *) { return true; } static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::eh_selector_i32 || - I->getIntrinsicID() == Intrinsic::eh_selector_i64; + return I->getIntrinsicID() == Intrinsic::eh_selector; } static inline bool classof(const Value *V) { return isa<IntrinsicInst>(V) && classof(cast<IntrinsicInst>(V)); |