[PATCH] D124126: [MC][NFC] Ensure tests that intended to cover compact unwind code paths do so

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 14:24:15 PDT 2022


int3 created this revision.
int3 added reviewers: grosbach, compnerd, MaskRay.
Herald added a subscriber: StephenFan.
Herald added a project: All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 2fca51d3b45efcf00ffcfe2879cd6d7d98c26258
fp-setup-macho.s was added in 03ffa797ad4fe8f85da532aa3f687841a60b4c0c

[1]: https://github.com/llvm/llvm-project/blob/16c93aaa4a955676fe05f876bd036719a1b14b2d/llvm/lib/MC/MCObjectFileInfo.cpp#L43


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124126

Files:
  llvm/test/MC/X86/compact-unwind-cfi_def_cfa.s
  llvm/test/MC/X86/fp-setup-macho.s


Index: llvm/test/MC/X86/fp-setup-macho.s
===================================================================
--- llvm/test/MC/X86/fp-setup-macho.s
+++ llvm/test/MC/X86/fp-setup-macho.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-macho -filetype obj -o - %s | llvm-readobj --sections - | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-macos10.6 -filetype obj -o - %s | llvm-readobj --sections - | FileCheck %s
 
 _label:
 	.cfi_startproc
Index: llvm/test/MC/X86/compact-unwind-cfi_def_cfa.s
===================================================================
--- llvm/test/MC/X86/compact-unwind-cfi_def_cfa.s
+++ llvm/test/MC/X86/compact-unwind-cfi_def_cfa.s
@@ -1,4 +1,4 @@
-// RUN: llvm-mc -triple x86_64-apple-darwin -filetype=obj %s -o - | llvm-readobj --sections - | FileCheck %s
+// RUN: llvm-mc -triple x86_64-apple-macos10.6 -filetype=obj %s -o - | llvm-readobj --sections - | FileCheck %s
 
 // We were trying to generate compact unwind info for assembly like this.
 // The .cfi_def_cfa directive, however, throws a wrench into that and was
@@ -72,9 +72,9 @@
 // CHECK:   Index: 1
 // CHECK:   Name: __eh_frame (5F 5F 65 68 5F 66 72 61 6D 65 00 00 00 00 00 00)
 // CHECK:   Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
-// CHECK:   Address: 0x70
+// CHECK:   Address:
 // CHECK:   Size: 0x40
-// CHECK:   Offset: 480
+// CHECK:   Offset:
 // CHECK:   Alignment: 3
 // CHECK:   RelocationOffset: 0x0
 // CHECK:   RelocationCount: 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124126.424027.patch
Type: text/x-patch
Size: 1474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220420/2067e553/attachment.bin>


More information about the llvm-commits mailing list