summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ExecutionEngine/MCJIT/remote/cross-module-a.ll3
-rw-r--r--test/ExecutionEngine/MCJIT/remote/multi-module-a.ll3
-rw-r--r--test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll4
-rw-r--r--test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll3
-rw-r--r--tools/lli/RemoteMemoryManager.cpp16
-rw-r--r--tools/lli/RemoteMemoryManager.h2
10 files changed, 25 insertions, 22 deletions
diff --git a/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll b/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
index 1e55d2d6a2..97f4edaf22 100644
--- a/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
+++ b/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll
@@ -1,5 +1,8 @@
; RUN: %lli_mcjit -extra-modules=%p/cross-module-b.ir -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
+; This fails because __main is not resolved in remote mcjit.
+; XFAIL: cygwin,mingw32
+
declare i32 @FB()
define i32 @FA() {
diff --git a/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll b/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
index f49acf7c18..b80965de3d 100644
--- a/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
+++ b/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll
@@ -1,5 +1,8 @@
; RUN: %lli_mcjit -extra-modules=%p/multi-module-b.ir,%p/multi-module-c.ir -disable-lazy-compilation=true -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
+; This fails because __main is not resolved in remote mcjit.
+; XFAIL: cygwin,mingw32
+
declare i32 @FB()
define i32 @main() {
diff --git a/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll b/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
index 797121831f..f717fde4f9 100644
--- a/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll
@@ -1,5 +1,7 @@
; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
-; XFAIL: mips
+
+; This fails because __main is not resolved in remote mcjit on cygming.
+; XFAIL: cygwin,mingw32,mips
define i32 @bar() {
ret i32 0
diff --git a/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
index 023263ec01..c3dbac3269 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
@@ -1,5 +1,7 @@
; RUN: %lli_mcjit -remote-mcjit -O0 -disable-lazy-compilation=false -mcjit-remote-process=lli-child-target %s
-; XFAIL: mips
+
+; This fails because __main is not resolved in remote mcjit on cygming.
+; XFAIL: cygwin,mingw32,mips
; The intention of this test is to verify that symbols mapped to COMMON in ELF
; work as expected.
diff --git a/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
index ca520c8000..8583bfe878 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
@@ -1,5 +1,7 @@
; RUN: %lli_mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target %s
-; XFAIL: mips
+
+; This fails because __main is not resolved in remote mcjit on cygming.
+; XFAIL: cygwin,mingw32,mips
; Check that a variable is always aligned as specified.
diff --git a/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
index dd3e3edae3..4f658ac920 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
@@ -1,5 +1,7 @@
; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
-; XFAIL: mips
+
+; This fails because __main is not resolved in remote mcjit on cygming.
+; XFAIL: cygwin,mingw32,mips
define double @test(double* %DP, double %Arg) {
%D = load double* %DP ; <double> [#uses=1]
diff --git a/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
index 90a8822a79..77868b9183 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
@@ -1,5 +1,7 @@
; RUN: %lli_mcjit -remote-mcjit -mcjit-remote-process=lli-child-target %s > /dev/null
-; XFAIL: mips
+
+; This fails because __main is not resolved in remote mcjit on cygming.
+; XFAIL: cygwin,mingw32,mips
@count = global i32 1, align 4
diff --git a/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll b/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
index 8b562972b5..3b542c39b1 100644
--- a/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
+++ b/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
@@ -1,5 +1,8 @@
; RUN: %lli_mcjit -remote-mcjit -O0 -mcjit-remote-process=lli-child-target %s
+; This fails because __main is not resolved in remote mcjit.
+; XFAIL: cygwin,mingw32
+
@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
@ptr = global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), align 4
@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
diff --git a/tools/lli/RemoteMemoryManager.cpp b/tools/lli/RemoteMemoryManager.cpp
index f730f0984f..04fc40e426 100644
--- a/tools/lli/RemoteMemoryManager.cpp
+++ b/tools/lli/RemoteMemoryManager.cpp
@@ -204,19 +204,3 @@ uint8_t *RemoteMemoryManager::allocateGlobal(uintptr_t Size, unsigned Alignment)
void RemoteMemoryManager::deallocateFunctionBody(void *Body) {
llvm_unreachable("Unexpected!");
}
-
-static int jit_noop() {
- return 0;
-}
-
-uint64_t RemoteMemoryManager::getSymbolAddress(const std::string &Name) {
- // We should not invoke parent's ctors/dtors from generated main()!
- // On Mingw and Cygwin, the symbol __main is resolved to
- // callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
- // (and register wrong callee's dtors with atexit(3)).
- // We expect ExecutionEngine::runStaticConstructorsDestructors()
- // is called before ExecutionEngine::runFunctionAsMain() is called.
- if (Name == "__main") return (uintptr_t)&jit_noop;
-
- return 0;
-}
diff --git a/tools/lli/RemoteMemoryManager.h b/tools/lli/RemoteMemoryManager.h
index 3368b30ed6..5d0456f509 100644
--- a/tools/lli/RemoteMemoryManager.h
+++ b/tools/lli/RemoteMemoryManager.h
@@ -78,7 +78,7 @@ public:
// interface does support this, but clients must provide their own
// mechanism for finding remote symbol addresses. MCJIT will resolve
// symbols from Modules it contains.
- uint64_t getSymbolAddress(const std::string &Name);
+ uint64_t getSymbolAddress(const std::string &Name) { return 0; }
void notifyObjectLoaded(ExecutionEngine *EE, const ObjectImage *Obj);