summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorFilip Pizlo <fpizlo@apple.com>2014-02-21 03:17:31 +0000
committerFilip Pizlo <fpizlo@apple.com>2014-02-21 03:17:31 +0000
commitb3cb707f935560e40e2c1b15922910e6246cccf5 (patch)
tree911d3e7daa507dceab3ae4676efa8e4b2be33b06 /unittests
parent9f5066c72c0aa77cc3a0a26f6e9f38af5daeeccb (diff)
downloadllvm-b3cb707f935560e40e2c1b15922910e6246cccf5.tar.gz
llvm-b3cb707f935560e40e2c1b15922910e6246cccf5.tar.bz2
llvm-b3cb707f935560e40e2c1b15922910e6246cccf5.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
index 7a7d178623..f6deb2f9b2 100644
--- a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
+++ b/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);