xref: /llvm-project/llvm/test/CodeGen/AArch64/macho-global-symbols.ll (revision 5ddce70ef0e5a641d7fea95e31fc5e2439cb98cb)
1; RUN: llc -mtriple=arm64-apple-ios %s -o - | FileCheck %s
2
3; All global symbols must be at-most linker-private for AArch64 because we don't
4; use section-relative relocations in MachO.
5
6define ptr @private_sym() {
7; CHECK-LABEL: private_sym:
8; CHECK:     adrp [[HIBITS:x[0-9]+]], l_var@PAGE
9; CHECK:     add x0, [[HIBITS]], l_var@PAGEOFF
10
11  ret ptr @var
12}
13
14; CHECK:     .section __TEXT,__cstring
15; CHECK: l_var:
16; CHECK:    .asciz "\002"
17@var = private unnamed_addr constant [2 x i8] [i8 2, i8 0]
18