Skip to content

Commit

Permalink
This test was failing on non-X86-64 platforms because stackmaps only …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Filip Pizlo committed Feb 21, 2014
1 parent 9f5066c commit b3cb707
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit b3cb707

Please sign in to comment.