diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-05 22:32:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-05 22:32:52 +0000 |
commit | 2597d07f15a1a3d6af793437f79b5bc972faeb36 (patch) | |
tree | 962c1003c5b662393d2174dd8240dfd2bf655e3b /lib/IR/AttributeImpl.h | |
parent | 165b22a2ae402198841bc4f1a6e7f4edf43d8df6 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r-- | lib/IR/AttributeImpl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h index ca7ae5cbb29..f23e9585cf0 100644 --- a/lib/IR/AttributeImpl.h +++ b/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; } |