OSDN Git Service

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)
commitbca133d0bb77f30b9866e6ec095e17914f185f04
tree7348a5611f7d5a7d812a982940601bb79aa20eff
parent9f15b40ef79df5fc966f50fc2c97d9f4fd0df47a
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260180 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/TrailingObjects.h
lib/IR/AttributeImpl.h
unittests/Support/TrailingObjectsTest.cpp