Skip to content

Commit

Permalink
Revert r279016 -- it breaks win32-elf JIT tests.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279029 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lhames committed Aug 18, 2016
1 parent aa4e23e commit b60f9a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ RTDyldMemoryManager::getSymbolAddressInProcess(const std::string &Name) {
const char *NameStr = Name.c_str();

// DynamicLibrary::SearchForAddresOfSymbol expects an unmangled 'C' symbol
// name so if we're on Darwin or 32-bit Windows, strip the leading '_' off.
#if defined(__APPLE__) || (defined(_WIN32) && !defined(_WIN64))
// name so ff we're on Darwin, strip the leading '_' off.
#ifdef __APPLE__
if (NameStr[0] == '_')
++NameStr;
#endif
Expand Down
4 changes: 2 additions & 2 deletions unittests/ExecutionEngine/ExecutionEngineTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ TEST_F(ExecutionEngineTest, LookupWithMangledAndDemangledSymbol) {
// RTDyldMemoryManager::getSymbolAddressInProcess expects a mangled symbol,
// but DynamicLibrary is a wrapper for dlsym, which expects the unmangled C
// symbol name. This test verifies that getSymbolAddressInProcess strips the
// leading '_' on Darwin and 32-bit Windows, but not on other platforms.
#if defined(__APPLE__) || (defined(_WIN32) && !defined(_WIN64))
// leading '_' on Darwin, but not on other platforms.
#ifdef __APPLE__
EXPECT_EQ(reinterpret_cast<uint64_t>(&x),
RTDyldMemoryManager::getSymbolAddressInProcess("_x"));
#else
Expand Down

0 comments on commit b60f9a2

Please sign in to comment.