Skip to content

Commit d1cd5b4

Browse files
committed
[AArch64] Null check TargetStreamer before emitting .variant_pcs
This was causing crashes on Mach-O targets as we don't construct a TargetStreamer for that object format. Other uses of the TargetStreamer (TS) appear to be limited to ELF and COFF platforms (where it is none null, so don't need changing).
1 parent 8bd35ca commit d1cd5b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/test/CodeGen/AArch64/variant-pcs.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -filetype=obj -o - %s \
33
; RUN: | llvm-readobj --symbols - | FileCheck %s --check-prefix=CHECK-OBJ
44

5+
; Check we don't crash when using a Mach-O object format.
6+
; RUN: llc -mtriple=arm64-apple-macosx15.0.0 -mattr=+sve -filetype=obj -o /dev/null %s
7+
58
define i32 @base_pcs() {
69
; CHECK-ASM-LABEL: base_pcs:
710
; CHECK-ASM-NOT: .variant_pcs

0 commit comments

Comments
 (0)