aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR
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 /lib/IR
parent17d4ac8c461fb3c32483cf7a37bc52937caeb650 (diff)
downloadexternal_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.zip
external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.gz
external_llvm-5a364c5561ec04e33a6f5d52c14f1bac6f247ea0.tar.bz2
[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 'lib/IR')
-rw-r--r--lib/IR/AttributeImpl.h2
-rw-r--r--lib/IR/Attributes.cpp2
-rw-r--r--lib/IR/Metadata.cpp4
-rw-r--r--lib/IR/Value.cpp8
4 files changed, 5 insertions, 11 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h
index 9da3f96..2d26044 100644
--- a/lib/IR/AttributeImpl.h
+++ b/lib/IR/AttributeImpl.h
@@ -46,8 +46,6 @@ protected:
AttributeImpl(AttrEntryKind KindID) : KindID(KindID) {}
public:
- virtual ~AttributeImpl();
-
bool isEnumAttribute() const { return KindID == EnumAttrEntry; }
bool isAlignAttribute() const { return KindID == AlignAttrEntry; }
bool isStringAttribute() const { return KindID == StringAttrEntry; }
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index bcd324c..f876778 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -286,8 +286,6 @@ bool Attribute::operator<(Attribute A) const {
// AttributeImpl Definition
//===----------------------------------------------------------------------===//
-AttributeImpl::~AttributeImpl() {}
-
bool AttributeImpl::hasAttribute(Attribute::AttrKind A) const {
if (isStringAttribute()) return false;
return getKindAsEnum() == A;
diff --git a/lib/IR/Metadata.cpp b/lib/IR/Metadata.cpp
index bd4d9c0..ef0660d 100644
--- a/lib/IR/Metadata.cpp
+++ b/lib/IR/Metadata.cpp
@@ -65,7 +65,7 @@ class MDNodeOperand : public CallbackVH {
public:
MDNodeOperand(Value *V) : CallbackVH(V) {}
- ~MDNodeOperand() {}
+ virtual ~MDNodeOperand();
void set(Value *V) {
unsigned IsFirst = this->getValPtrInt();
@@ -82,6 +82,8 @@ public:
};
} // end namespace llvm.
+MDNodeOperand::~MDNodeOperand() {}
+
void MDNodeOperand::deleted() {
getParent()->replaceOperand(this, 0);
diff --git a/lib/IR/Value.cpp b/lib/IR/Value.cpp
index 35808a6..a56272f 100644
--- a/lib/IR/Value.cpp
+++ b/lib/IR/Value.cpp
@@ -735,9 +735,5 @@ void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
#endif
}
-// Default implementation for CallbackVH.
-void CallbackVH::allUsesReplacedWith(Value *) {}
-
-void CallbackVH::deleted() {
- setValPtr(NULL);
-}
+// pin vtable to this file
+void CallbackVH::anchor() {}