Skip to content

Commit 9c4b2ff

Browse files
committed
[MC][NFC] Ensure tests that intended to cover compact unwind code paths do so
These two tests were intended to cover the CU code paths, but invoked llvm-mc using a generic "darwin" platform. However, MC only attempts to emit CU for `macos >= 10.6` [1]. Thus we adjust the tests accordingly. compact-unwind-cfi_def_cfa.s was added in 2fca51d fp-setup-macho.s was added in 03ffa79 [1]: https://github.com/llvm/llvm-project/blob/16c93aaa4a955676fe05f876bd036719a1b14b2d/llvm/lib/MC/MCObjectFileInfo.cpp#L43 Reviewed By: MaskRay, smeenai Differential Revision: https://reviews.llvm.org/D124126
1 parent 7d61a84 commit 9c4b2ff

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/test/MC/X86/compact-unwind-cfi_def_cfa.s

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: llvm-mc -triple x86_64-apple-darwin -filetype=obj %s -o - | llvm-readobj --sections - | FileCheck %s
1+
// RUN: llvm-mc -triple x86_64-apple-macosx10.6 -filetype=obj %s -o - | llvm-readobj --sections - | FileCheck %s
22

33
// We were trying to generate compact unwind info for assembly like this.
44
// The .cfi_def_cfa directive, however, throws a wrench into that and was
@@ -72,9 +72,9 @@ _foo:
7272
// CHECK: Index: 1
7373
// CHECK: Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00)
7474
// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
75-
// CHECK: Address: 0x70
75+
// CHECK: Address:
7676
// CHECK: Size: 0x40
77-
// CHECK: Offset: 480
77+
// CHECK: Offset:
7878
// CHECK: Alignment: 3
7979
// CHECK: RelocationOffset: 0x0
8080
// CHECK: RelocationCount: 0

llvm/test/MC/X86/fp-setup-macho.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: llvm-mc -triple x86_64-apple-macho -filetype obj -o - %s | llvm-readobj --sections - | FileCheck %s
1+
// RUN: llvm-mc -triple x86_64-apple-macosx10.6 -filetype obj -o - %s | llvm-readobj --sections - | FileCheck %s
22

33
_label:
44
.cfi_startproc

0 commit comments

Comments
 (0)