xref: /llvm-project/llvm/test/tools/llvm-symbolizer/code.s (revision c96fee98dbff50356f5cc92724e1fcfec2865c42)
1## Show that when "CODE" is used with an address, it forces the found location
2## to be symbolized as a function (this is the default).
3# REQUIRES: x86-registered-target
4# RUN: llvm-mc -g -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
5# RUN: llvm-symbolizer "CODE 0x1" "CODE 0x2" --obj=%t.o > %t.code
6# RUN: llvm-symbolizer 0x1 0x2 --obj=%t.o > %t.default
7# RUN: cmp %t.code %t.default
8# RUN: FileCheck %s --input-file=%t.code -DFILE=%s --implicit-check-not={{.}}
9
10# CHECK:      f1
11f1:
12    nop
13# CHECK-NEXT: [[FILE]]:[[@LINE+1]]:0
14    ret
15# CHECK-EMPTY:
16# CHECK-NEXT: f2
17f2:
18# CHECK-NEXT: [[FILE]]:[[@LINE+1]]:0
19    ret
20