diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-05 05:21:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-05 05:21:26 +0000 |
commit | 43fd9017a69a6314fb780f87083b1e57a0981287 (patch) | |
tree | b1e2b2c300747013130e431316af79b2cc2c4f1c | |
parent | 5f94af0f725690a75b18909da2ff8cee0f93bebb (diff) | |
download | external_llvm-43fd9017a69a6314fb780f87083b1e57a0981287.zip external_llvm-43fd9017a69a6314fb780f87083b1e57a0981287.tar.gz external_llvm-43fd9017a69a6314fb780f87083b1e57a0981287.tar.bz2 |
convert various IntrinsicInst's to use class instead of struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92681 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/IntrinsicInst.h | 30 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/Local.h | 2 | ||||
-rw-r--r-- | lib/Transforms/InstCombine/InstCombine.h | 6 |
3 files changed, 24 insertions, 14 deletions
diff --git a/include/llvm/IntrinsicInst.h b/include/llvm/IntrinsicInst.h index 5889709..5808938 100644 --- a/include/llvm/IntrinsicInst.h +++ b/include/llvm/IntrinsicInst.h @@ -58,7 +58,8 @@ namespace llvm { /// DbgInfoIntrinsic - This is the common base class for debug info intrinsics /// - struct DbgInfoIntrinsic : public IntrinsicInst { + class DbgInfoIntrinsic : public IntrinsicInst { + public: // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const DbgInfoIntrinsic *) { return true; } @@ -79,7 +80,8 @@ namespace llvm { /// DbgDeclareInst - This represents the llvm.dbg.declare instruction. /// - struct DbgDeclareInst : public DbgInfoIntrinsic { + class DbgDeclareInst : public DbgInfoIntrinsic { + public: Value *getAddress() const { return getOperand(1); } MDNode *getVariable() const { return cast<MDNode>(getOperand(2)); } @@ -95,7 +97,8 @@ namespace llvm { /// DbgValueInst - This represents the llvm.dbg.value instruction. /// - struct DbgValueInst : public DbgInfoIntrinsic { + class DbgValueInst : public DbgInfoIntrinsic { + public: Value *getValue() const; Value *getOffset() const { return getOperand(2); } MDNode *getVariable() const { return cast<MDNode>(getOperand(3)); } @@ -112,7 +115,8 @@ namespace llvm { /// MemIntrinsic - This is the common base class for memset/memcpy/memmove. /// - struct MemIntrinsic : public IntrinsicInst { + class MemIntrinsic : public IntrinsicInst { + public: Value *getRawDest() const { return const_cast<Value*>(getOperand(1)); } Value *getLength() const { return const_cast<Value*>(getOperand(3)); } @@ -169,7 +173,8 @@ namespace llvm { /// MemSetInst - This class wraps the llvm.memset intrinsic. /// - struct MemSetInst : public MemIntrinsic { + class MemSetInst : public MemIntrinsic { + public: /// get* - Return the arguments to the instruction. /// Value *getValue() const { return const_cast<Value*>(getOperand(2)); } @@ -192,7 +197,8 @@ namespace llvm { /// MemTransferInst - This class wraps the llvm.memcpy/memmove intrinsics. /// - struct MemTransferInst : public MemIntrinsic { + class MemTransferInst : public MemIntrinsic { + public: /// get* - Return the arguments to the instruction. /// Value *getRawSource() const { return const_cast<Value*>(getOperand(2)); } @@ -222,7 +228,8 @@ namespace llvm { /// MemCpyInst - This class wraps the llvm.memcpy intrinsic. /// - struct MemCpyInst : public MemTransferInst { + class MemCpyInst : public MemTransferInst { + public: // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const MemCpyInst *) { return true; } static inline bool classof(const IntrinsicInst *I) { @@ -235,7 +242,8 @@ namespace llvm { /// MemMoveInst - This class wraps the llvm.memmove intrinsic. /// - struct MemMoveInst : public MemTransferInst { + class MemMoveInst : public MemTransferInst { + public: // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const MemMoveInst *) { return true; } static inline bool classof(const IntrinsicInst *I) { @@ -248,7 +256,8 @@ namespace llvm { /// EHSelectorInst - This represents the llvm.eh.selector instruction. /// - struct EHSelectorInst : public IntrinsicInst { + class EHSelectorInst : public IntrinsicInst { + public: // 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) { @@ -262,7 +271,8 @@ namespace llvm { /// MemoryUseIntrinsic - This is the common base class for the memory use /// marker intrinsics. /// - struct MemoryUseIntrinsic : public IntrinsicInst { + class MemoryUseIntrinsic : public IntrinsicInst { + public: // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const MemoryUseIntrinsic *) { return true; } diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index 2cdd31f..5f23d88 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -27,7 +27,7 @@ class PHINode; class AllocaInst; class ConstantExpr; class TargetData; -struct DbgInfoIntrinsic; +class DbgInfoIntrinsic; template<typename T> class SmallVectorImpl; diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h index 635d627..7e20be4 100644 --- a/lib/Transforms/InstCombine/InstCombine.h +++ b/lib/Transforms/InstCombine/InstCombine.h @@ -20,9 +20,9 @@ namespace llvm { class CallSite; class TargetData; - struct DbgDeclareInst; - struct MemIntrinsic; - struct MemSetInst; + class DbgDeclareInst; + class MemIntrinsic; + class MemSetInst; /// SelectPatternFlavor - We can match a variety of different patterns for /// select operations. |