summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2013-11-19 03:08:35 +0000
committerJuergen Ributzka <juergen@apple.com>2013-11-19 03:08:35 +0000
commit05c5a93283b830032532321fdc4c0fe6b8473aac (patch)
treea6dd62ef804f1e97d576d5741db7fb04f1ce771e /llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
parentef9315d942a0499141769e3c53c8830ee1e74841 (diff)
downloadbcm5719-llvm-05c5a93283b830032532321fdc4c0fe6b8473aac.tar.gz
bcm5719-llvm-05c5a93283b830032532321fdc4c0fe6b8473aac.zip
[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. llvm-svn: 195092
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
index 9786befd720..fab81551fa5 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
+++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp
@@ -18,19 +18,13 @@
using namespace llvm;
+namespace {
+
class MCJITTest : public testing::Test, public MCJITTestBase {
protected:
-
- virtual void SetUp();
+ virtual void SetUp() { M.reset(createEmptyModule("<main>")); }
};
-// Provide out-of-line definition to prevent weak vtable.
-void MCJITTest::SetUp() {
- M.reset(createEmptyModule("<main>"));
-}
-
-namespace {
-
// FIXME: Ensure creating an execution engine does not crash when constructed
// with a null module.
/*
OpenPOWER on IntegriCloud