summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitdbedae89b90327ff464e8fc4d66bf328331b871c (patch)
tree1df23eb275047b5e7e439c207911b1f051793dda /llvm/lib/IR
parente79cef6ae102924cb842d97dbf7694665b76e283 (diff)
downloadbcm5719-llvm-dbedae89b90327ff464e8fc4d66bf328331b871c.tar.gz
bcm5719-llvm-dbedae89b90327ff464e8fc4d66bf328331b871c.zip
[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 llvm-svn: 194865
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/AttributeImpl.h2
-rw-r--r--llvm/lib/IR/Attributes.cpp2
-rw-r--r--llvm/lib/IR/Metadata.cpp4
-rw-r--r--llvm/lib/IR/Value.cpp8
4 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h
index 9da3f9659e0..2d2604449a2 100644
--- a/llvm/lib/IR/AttributeImpl.h
+++ b/llvm/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/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index bcd324c4ffa..f876778c45c 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/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/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index bd4d9c0a077..ef0660da864 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/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/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index 35808a658b4..a56272ffe68 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/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() {}
OpenPOWER on IntegriCloud