add an out-of-line virtual method to CmpInst to give it a home.
authorChris Lattner <sabre@nondot.org>
Fri, 22 Jan 2010 06:25:37 +0000 (06:25 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 22 Jan 2010 06:25:37 +0000 (06:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94161 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/InstrTypes.h
lib/VMCore/Instructions.cpp

index 85aaa7f0592a6fa66365c59b7812526d736299cd..b5cc65962e8392e9cc6fc550bc54eb660690b973 100644 (file)
@@ -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
index 2619047cb3065bacda0bf37cb784fe61b8341494..8ff36cb6fbdbddbff23a19bc206cb2677627f53a 100644 (file)
@@ -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)