diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-09 02:09:16 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-02-09 02:09:16 +0000 |
commit | a64e1adf849c07232c2bd27b90a59f29659211e7 (patch) | |
tree | 822f827d31f960b003c411bb7d0d9ea768069c9e /llvm/unittests/Support/TrailingObjectsTest.cpp | |
parent | 840144887a9c7c9d5bef666524efe8904d880cde (diff) | |
download | bcm5719-llvm-a64e1adf849c07232c2bd27b90a59f29659211e7.tar.gz bcm5719-llvm-a64e1adf849c07232c2bd27b90a59f29659211e7.zip |
Remove TrailingObjects::operator delete. It's still suffering from
compiler-specific issues. Instead, repeat an 'operator delete' definition in
each derived class that is actually deleted, and give up on the static type
safety of an error when sized delete is accidentally used on a type derived
from TrailingObjects.
llvm-svn: 260190
Diffstat (limited to 'llvm/unittests/Support/TrailingObjectsTest.cpp')
-rw-r--r-- | llvm/unittests/Support/TrailingObjectsTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Support/TrailingObjectsTest.cpp b/llvm/unittests/Support/TrailingObjectsTest.cpp index 282f402ec8e..a1d3e7b3c86 100644 --- a/llvm/unittests/Support/TrailingObjectsTest.cpp +++ b/llvm/unittests/Support/TrailingObjectsTest.cpp @@ -34,7 +34,7 @@ public: void *Mem = ::operator new(totalSizeToAlloc<short>(NumShorts)); return new (Mem) Class1(ShortArray, NumShorts); } - void operator delete(void *p) { TrailingObjects::operator delete(p); } + void operator delete(void *p) { ::operator delete(p); } short get(unsigned Num) const { return getTrailingObjects<short>()[Num]; } @@ -79,7 +79,7 @@ public: *C->getTrailingObjects<double>() = D; return C; } - void operator delete(void *p) { TrailingObjects::operator delete(p); } + void operator delete(void *p) { ::operator delete(p); } short getShort() const { if (!HasShort) |