diff options
author | Filip Pizlo <fpizlo@apple.com> | 2014-02-21 03:17:31 +0000 |
---|---|---|
committer | Filip Pizlo <fpizlo@apple.com> | 2014-02-21 03:17:31 +0000 |
commit | d57124455baec5c51de8e1bb0f1c84166e5a36da (patch) | |
tree | 2ba24bd1190bd37fe27f9937c3da2f45609a7bfb /llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp | |
parent | 33ebd2171e91102e7a494757e96e5c467f003460 (diff) | |
download | bcm5719-llvm-d57124455baec5c51de8e1bb0f1c84166e5a36da.tar.gz bcm5719-llvm-d57124455baec5c51de8e1bb0f1c84166e5a36da.zip |
This test was failing on non-X86-64 platforms because stackmaps only work on X86-64.
Disable it on non-X86-64 platforms and add a comment.
llvm-svn: 201838
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp index 7a7d178623d..f6deb2f9b21 100644 --- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp +++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp @@ -363,6 +363,10 @@ TEST_F(MCJITCAPITest, custom_memory_manager) { TEST_F(MCJITCAPITest, stackmap_creates_compact_unwind_on_darwin) { SKIP_UNSUPPORTED_PLATFORM; + // This test is also not supported on non-x86 platforms. + if (Triple(HostTriple).getArch() != Triple::x86_64) + return; + buildFunctionThatUsesStackmap(); buildMCJITOptions(); useRoundTripSectionMemoryManager(); @@ -378,6 +382,11 @@ TEST_F(MCJITCAPITest, stackmap_creates_compact_unwind_on_darwin) { EXPECT_EQ(42, functionPointer.usable()); EXPECT_TRUE(didCallAllocateCodeSection); + // Up to this point, the test is specific only to X86-64. But this next + // expectation is only valid on Darwin because it assumes that unwind + // data is made available only through compact_unwind. It would be + // worthwhile to extend this to handle non-Darwin platforms, in which + // case you'd want to look for an eh_frame or something. EXPECT_TRUE( Triple(HostTriple).getOS() != Triple::Darwin || didAllocateCompactUnwindSection); |