mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218741 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user