Re-commit r259942 (reverted in r260053) with a different workaround for the MSVC...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 9 Feb 2016 01:03:42 +0000 (01:03 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 9 Feb 2016 01:03:42 +0000 (01:03 +0000)
commit1b65c3279d75428d2e1ae1a196c4884d6745d0d8
tree047d45e440ccac0844ec594b1c857db4a9763151
parentfed557ef7611a3d4a83f17c86067369044e74063
Re-commit r259942 (reverted in r260053) with a different workaround for the MSVC bug.

This fixes undefined behavior in C++14 due to the size of the object being
deleted being different from sizeof(dynamic type) when it is allocated with
trailing objects.

MSVC seems to have several bugs around using-declarations changing the access
of a member inherited from a base class, so use forwarding functions instead of
using-declarations to make TrailingObjects::operator delete accessible where
desired.

llvm-svn: 260180
llvm/include/llvm/Support/TrailingObjects.h
llvm/lib/IR/AttributeImpl.h
llvm/unittests/Support/TrailingObjectsTest.cpp