From a64e1adf849c07232c2bd27b90a59f29659211e7 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 9 Feb 2016 02:09:16 +0000 Subject: 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 --- llvm/unittests/Support/TrailingObjectsTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/unittests/Support/TrailingObjectsTest.cpp') 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(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()[Num]; } @@ -79,7 +79,7 @@ public: *C->getTrailingObjects() = 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) -- cgit v1.2.3