diff options
author | Lang Hames <lhames@gmail.com> | 2014-10-01 04:11:13 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-10-01 04:11:13 +0000 |
commit | 2f27b2fe8910d0227eb84bed75bba1b2f0c9bf42 (patch) | |
tree | fe446848f71e2b44e9c4e88c3bd40c2a6d830794 /llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp | |
parent | 2d779b984c6b25c5a3c0971fe3e62601b18da90d (diff) | |
download | bcm5719-llvm-2f27b2fe8910d0227eb84bed75bba1b2f0c9bf42.tar.gz bcm5719-llvm-2f27b2fe8910d0227eb84bed75bba1b2f0c9bf42.zip |
[MCJIT] Turn the getSymbolAddress free function created in r218626 into a static
member of RTDyldMemoryManager (and rename to getSymbolAddressInProcess).
The functionality this provides is very specific to RTDyldMemoryManager, so it
makes sense to keep it in that class to avoid accidental re-use.
No functional change.
llvm-svn: 218741
Diffstat (limited to 'llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp b/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp index ad341c8820f..19917a41350 100644 --- a/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp +++ b/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp @@ -140,7 +140,8 @@ TEST_F(ExecutionEngineTest, LookupWithMangledName) { // Demonstrate that getSymbolAddress accepts mangled names and always strips // the leading underscore. - EXPECT_EQ(reinterpret_cast<uint64_t>(&x), getSymbolAddress("_x")); + EXPECT_EQ(reinterpret_cast<uint64_t>(&x), + RTDyldMemoryManager::getSymbolAddressInProcess("_x")); } TEST_F(ExecutionEngineTest, LookupWithMangledAndDemangledSymbol) { @@ -151,7 +152,8 @@ TEST_F(ExecutionEngineTest, LookupWithMangledAndDemangledSymbol) { // Lookup the demangled name first, even if there's a demangled symbol that // matches the input already. - EXPECT_EQ(reinterpret_cast<uint64_t>(&x), getSymbolAddress("_x")); + EXPECT_EQ(reinterpret_cast<uint64_t>(&x), + RTDyldMemoryManager::getSymbolAddressInProcess("_x")); } TEST_F(ExecutionEngineTest, LookupwithDemangledName) { @@ -159,7 +161,8 @@ TEST_F(ExecutionEngineTest, LookupwithDemangledName) { llvm::sys::DynamicLibrary::AddSymbol("_x", &_x); // But do fallback to looking up a demangled name if there's no ambiguity - EXPECT_EQ(reinterpret_cast<uint64_t>(&_x), getSymbolAddress("_x")); + EXPECT_EQ(reinterpret_cast<uint64_t>(&_x), + RTDyldMemoryManager::getSymbolAddressInProcess("_x")); } } |