summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-02-05 22:32:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-02-05 22:32:52 +0000
commitebfdf26d934913e37b89bdaa037d0e4232f600a3 (patch)
tree00180b90ca680661250e0e9a0fc1750b06bd23a8 /llvm/lib/IR
parent6219836edd78a7dd4f710cef314409e0061d8c8d (diff)
downloadbcm5719-llvm-ebfdf26d934913e37b89bdaa037d0e4232f600a3.tar.gz
bcm5719-llvm-ebfdf26d934913e37b89bdaa037d0e4232f600a3.zip
More workarounds for undefined behavior exposed when compiling in C++14 with
-fsized-deallocation. Disable sized deallocation for all objects derived from TrailingObjects, as we expect the storage allocated for these objects to be larger than the size of their dynamic type. llvm-svn: 259942
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/AttributeImpl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h
index ca7ae5cbb29..f23e9585cf0 100644
--- a/llvm/lib/IR/AttributeImpl.h
+++ b/llvm/lib/IR/AttributeImpl.h
@@ -171,6 +171,8 @@ class AttributeSetNode final
void operator=(const AttributeSetNode &) = delete;
AttributeSetNode(const AttributeSetNode &) = delete;
public:
+ using TrailingObjects::operator delete;
+
static AttributeSetNode *get(LLVMContext &C, ArrayRef<Attribute> Attrs);
bool hasAttribute(Attribute::AttrKind Kind) const {
@@ -266,6 +268,8 @@ public:
}
}
+ using TrailingObjects::operator delete;
+
/// \brief Get the context that created this AttributeSetImpl.
LLVMContext &getContext() { return Context; }
OpenPOWER on IntegriCloud