X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FTGValueTypes.cpp;h=f4893f50a6ff86032509a8b998f4cf39e5ae33d7;hb=d92ff21d6f526cadea7d6db21f493ba5c85e1411;hp=81c0d4c544fc99f17f43b870db6e390886f63ff4;hpb=5a364c5561ec04e33a6f5d52c14f1bac6f247ea0;p=oota-llvm.git diff --git a/utils/TableGen/TGValueTypes.cpp b/utils/TableGen/TGValueTypes.cpp index 81c0d4c544f..f4893f50a6f 100644 --- a/utils/TableGen/TGValueTypes.cpp +++ b/utils/TableGen/TGValueTypes.cpp @@ -38,16 +38,17 @@ public: virtual ~Type(); }; +// Provide out-of-line definition to prevent weak vtable. Type::~Type() {} } +namespace { class ExtendedIntegerType : public Type { unsigned BitWidth; public: explicit ExtendedIntegerType(unsigned bits) : Type(TK_ExtendedIntegerType), BitWidth(bits) {} - virtual ~ExtendedIntegerType(); static bool classof(const Type *T) { return T->getKind() == TK_ExtendedIntegerType; } @@ -59,16 +60,12 @@ public: } }; -ExtendedIntegerType::~ExtendedIntegerType() {} - - class ExtendedVectorType : public Type { EVT ElementType; unsigned NumElements; public: ExtendedVectorType(EVT elty, unsigned num) : Type(TK_ExtendedVectorType), ElementType(elty), NumElements(num) {} - virtual ~ExtendedVectorType(); static bool classof(const Type *T) { return T->getKind() == TK_ExtendedVectorType; } @@ -82,9 +79,7 @@ public: return NumElements; } }; - -ExtendedVectorType::~ExtendedVectorType() {} - +} // end anonymous namespace static std::map ExtendedIntegerTypeMap;