1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/tools/llvm-symbolizer/code.s
James Henderson 9dab5030f6 [llvm-symbolizer][test] Add explicit tests for CODE and DATA
These directives force the associated address to be interpreted as a
function or data respectively. CODE is the default when not specified.

Differential Revision: https://reviews.llvm.org/D96712

Reviewed by: MaskRay
2021-02-16 10:59:25 +00:00

20 lines
622 B
ArmAsm

## Show that when "CODE" is used with an address, it forces the found location
## to be symbolized as a function (this is the default).
# REQUIRES: x86-registered-target
# RUN: llvm-mc -g -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: llvm-symbolizer "CODE 0x1" "CODE 0x2" --obj=%t.o > %t.code
# RUN: llvm-symbolizer 0x1 0x2 --obj=%t.o > %t.default
# RUN: cmp %t.code %t.default
# RUN: FileCheck %s --input-file=%t.code -DFILE=%s --implicit-check-not={{.}}
# CHECK: f1
f1:
nop
# CHECK-NEXT: [[FILE]]:[[@LINE+1]]:0
ret
# CHECK-EMPTY:
# CHECK-NEXT: f2
f2:
# CHECK-NEXT: [[FILE]]:[[@LINE+1]]:0
ret