brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 5293958 Raw
40 lines · plain
1# REQUIRES: asserts2# RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o %t %s3# RUN: llvm-jitlink -num-threads=0 -debug-only=orc -noexec \4# RUN:              -abs _external_func=0x1 -entry=_foo %t 2>&1 \5# RUN:              | FileCheck %s6#7# Check that simplification eliminates dependencies on symbols in this unit,8# and correctly propagates dependencies on symbols outside the unit (including9# via locally scoped symbols). In this test _baz depends on _foo indirectly via10# the local symbol _bar. Initially we expect _baz to depend on _foo, and _foo11# on _external_func, after simplification we expect both to depend on12# _external_func only.13 14# CHECK: In main emitting {{.*}}_foo{{.*}}15# CHECK-NEXT: Initial dependencies:16# CHECK-DAG: Symbols: { _foo }, Dependencies: { (main, { _external_func }) }17# CHECK-DAG: Symbols: { _baz }, Dependencies: { (main, { _foo }) }18# CHECK: Simplified dependencies:19# CHECK-DAG: Defs: { (main, [ _baz _foo ]) }, Deps: { (main, [ _external_func ]) }20 21        .section	__TEXT,__text,regular,pure_instructions22 23	.globl	_foo24	.p2align	4, 0x9025_foo:26	jmp	_external_func27 28	.p2align	4, 0x9029_bar:30 31	jmp	_foo32 33	.globl	_baz34	.p2align	4, 0x9035_baz:36 37	jmp	_bar38 39.subsections_via_symbols40