diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-22 06:25:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-22 06:25:37 +0000 |
commit | 36fe19837c0c44207d1cbd6040764928409f66d6 (patch) | |
tree | 1a36b276f5c8615bbc83ac0beee29adc0733eb7f | |
parent | 476e9bd1146624fa17243ae55fdb156f905ba3d4 (diff) |
add an out-of-line virtual method to CmpInst to give it a home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94161 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/InstrTypes.h | 4 | ||||
-rw-r--r-- | lib/VMCore/Instructions.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 85aaa7f059..b5cc65962e 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -652,8 +652,7 @@ public: /// This class is the base class for the comparison instructions. /// @brief Abstract base class of comparison instructions. -// FIXME: why not derive from BinaryOperator? -class CmpInst: public Instruction { +class CmpInst : public Instruction { void *operator new(size_t, unsigned); // DO NOT IMPLEMENT CmpInst(); // do not implement protected: @@ -665,6 +664,7 @@ protected: Value *LHS, Value *RHS, const Twine &Name, BasicBlock *InsertAtEnd); + virtual void Anchor() const; // Out of line virtual method. public: /// This enumeration lists the possible predicates for CmpInst subclasses. /// Values in the range 0-31 are reserved for FCmpInst, while values in the diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 2619047cb3..8ff36cb6fb 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -2714,6 +2714,8 @@ BitCastInst::BitCastInst( // CmpInst Classes //===----------------------------------------------------------------------===// +void CmpInst::Anchor() const {} + CmpInst::CmpInst(const Type *ty, OtherOps op, unsigned short predicate, Value *LHS, Value *RHS, const Twine &Name, Instruction *InsertBefore) |