summaryrefslogtreecommitdiff
path: root/utils/TableGen/TGValueTypes.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2013-11-15 22:34:48 +0000
committerJuergen Ributzka <juergen@apple.com>2013-11-15 22:34:48 +0000
commit5a364c5561ec04e33a6f5d52c14f1bac6f247ea0 (patch)
tree2fcdad4351006993fd039cba47193d98cdfc5ae3 /utils/TableGen/TGValueTypes.cpp
parent17d4ac8c461fb3c32483cf7a37bc52937caeb650 (diff)
downloadllvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.gz
llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.bz2
llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.xz
[weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TGValueTypes.cpp')
-rw-r--r--utils/TableGen/TGValueTypes.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/utils/TableGen/TGValueTypes.cpp b/utils/TableGen/TGValueTypes.cpp
index 3ac71a4914..81c0d4c544 100644
--- a/utils/TableGen/TGValueTypes.cpp
+++ b/utils/TableGen/TGValueTypes.cpp
@@ -35,9 +35,11 @@ public:
}
Type(TypeKind K) : Kind(K) {}
virtual unsigned getSizeInBits() const = 0;
- virtual ~Type() {}
+ virtual ~Type();
};
+Type::~Type() {}
+
}
class ExtendedIntegerType : public Type {
@@ -45,10 +47,11 @@ class ExtendedIntegerType : public Type {
public:
explicit ExtendedIntegerType(unsigned bits)
: Type(TK_ExtendedIntegerType), BitWidth(bits) {}
+ virtual ~ExtendedIntegerType();
static bool classof(const Type *T) {
return T->getKind() == TK_ExtendedIntegerType;
}
- unsigned getSizeInBits() const {
+ virtual unsigned getSizeInBits() const {
return getBitWidth();
}
unsigned getBitWidth() const {
@@ -56,16 +59,20 @@ 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;
}
- unsigned getSizeInBits() const {
+ virtual unsigned getSizeInBits() const {
return getNumElements() * getElementType().getSizeInBits();
}
EVT getElementType() const {
@@ -76,6 +83,9 @@ public:
}
};
+ExtendedVectorType::~ExtendedVectorType() {}
+
+
static std::map<unsigned, const Type *>
ExtendedIntegerTypeMap;
static std::map<std::pair<uintptr_t, uintptr_t>, const Type *>