[llvm-commits] [llvm] r92681 - in /llvm/trunk: include/llvm/IntrinsicInst.h include/llvm/Transforms/Utils/Local.h lib/Transforms/InstCombine/InstCombine.h
Chris Lattner
sabre at nondot.org
Mon Jan 4 21:21:30 PST 2010
Author: lattner
Date: Mon Jan 4 23:21:26 2010
New Revision: 92681
URL: http://llvm.org/viewvc/llvm-project?rev=92681&view=rev
Log:
convert various IntrinsicInst's to use class instead of struct.
Modified:
llvm/trunk/include/llvm/IntrinsicInst.h
llvm/trunk/include/llvm/Transforms/Utils/Local.h
llvm/trunk/lib/Transforms/InstCombine/InstCombine.h
Modified: llvm/trunk/include/llvm/IntrinsicInst.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicInst.h?rev=92681&r1=92680&r2=92681&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IntrinsicInst.h (original)
+++ llvm/trunk/include/llvm/IntrinsicInst.h Mon Jan 4 23:21:26 2010
@@ -58,7 +58,8 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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; }
Modified: llvm/trunk/include/llvm/Transforms/Utils/Local.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/Local.h?rev=92681&r1=92680&r2=92681&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/Local.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/Local.h Mon Jan 4 23:21:26 2010
@@ -27,7 +27,7 @@
class AllocaInst;
class ConstantExpr;
class TargetData;
-struct DbgInfoIntrinsic;
+class DbgInfoIntrinsic;
template<typename T> class SmallVectorImpl;
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombine.h?rev=92681&r1=92680&r2=92681&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombine.h (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombine.h Mon Jan 4 23:21:26 2010
@@ -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.
More information about the llvm-commits
mailing list