Revert r194865 and r194874.
This change is incorrect. If you delete virtual destructor of both a base class
and a subclass, then the following code:
Base *foo = new Child();
delete foo;
will not cause the destructor for members of Child class. As a result, I observe
plently of memory leaks. Notable examples I investigated are:
ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl.
llvm-svn: 194997
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
index 3a86eb5..7ccd254 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
+++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
@@ -21,13 +21,11 @@
class MCJITTest : public testing::Test, public MCJITTestBase {
protected:
- virtual void SetUp();
+ virtual void SetUp() {
+ M.reset(createEmptyModule("<main>"));
+ }
};
-void MCJITTest::SetUp() {
- M.reset(createEmptyModule("<main>"));
-}
-
namespace {
// FIXME: Ensure creating an execution engine does not crash when constructed