[llvm-commits] [llvm] r94161 - in /llvm/trunk: include/llvm/InstrTypes.h lib/VMCore/Instructions.cpp
Chris Lattner
sabre at nondot.org
Thu Jan 21 22:25:38 PST 2010
Author: lattner
Date: Fri Jan 22 00:25:37 2010
New Revision: 94161
URL: http://llvm.org/viewvc/llvm-project?rev=94161&view=rev
Log:
add an out-of-line virtual method to CmpInst to give it a home.
Modified:
llvm/trunk/include/llvm/InstrTypes.h
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/include/llvm/InstrTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InstrTypes.h?rev=94161&r1=94160&r2=94161&view=diff
==============================================================================
--- llvm/trunk/include/llvm/InstrTypes.h (original)
+++ llvm/trunk/include/llvm/InstrTypes.h Fri Jan 22 00:25:37 2010
@@ -652,8 +652,7 @@
/// 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 @@
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
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=94161&r1=94160&r2=94161&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Fri Jan 22 00:25:37 2010
@@ -2714,6 +2714,8 @@
// 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)
More information about the llvm-commits
mailing list