[weak vtables] Place class definitions into anonymous namespaces to prevent weak vtables.

This patch places class definitions in implementation files into anonymous
namespaces to prevent weak vtables. This eliminates the need of providing an
out-of-line definition to pin the vtable explicitly to the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Juergen Ributzka
2013-11-19 03:08:35 +00:00
parent 36c7806f4e
commit ba0f991a78
14 changed files with 80 additions and 155 deletions

View File

@ -18,16 +18,10 @@
using namespace llvm;
class MCJITMultipleModuleTest : public testing::Test, public MCJITTestBase {
public:
virtual ~MCJITMultipleModuleTest();
};
// Provide out-of-line definition to prevent weak vtable.
MCJITMultipleModuleTest::~MCJITMultipleModuleTest() {}
namespace {
class MCJITMultipleModuleTest : public testing::Test, public MCJITTestBase {};
// FIXME: ExecutionEngine has no support empty modules
/*
TEST_F(MCJITMultipleModuleTest, multiple_empty_modules) {