2018-10-19 20:14:30 +08:00
|
|
|
# RUN: not llvm-mc %s -triple x86_64-linux -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
# RUN: not llvm-mc %s -triple x86_64-linux -filetype=obj -o /dev/null 2>&1 | FileCheck %s
|
2017-10-10 09:49:21 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.cfi_def_cfa rsp, 8
|
2020-11-11 22:27:01 +08:00
|
|
|
# CHECK: [[#@LINE-1]]:1: error: this directive must appear between .cfi_startproc and .cfi_endproc directives
|
2017-10-10 09:49:21 +08:00
|
|
|
|
|
|
|
.cfi_startproc
|
|
|
|
nop
|
|
|
|
|
2020-11-11 22:27:01 +08:00
|
|
|
## This tests source location correctness as well as the error and it not crashing.
|
|
|
|
# CHECK: [[#@LINE+2]]:1: error: starting new .cfi frame before finishing the previous one
|
2017-10-10 09:49:21 +08:00
|
|
|
.cfi_startproc
|
2018-10-19 20:14:30 +08:00
|
|
|
|
2017-10-10 09:49:21 +08:00
|
|
|
nop
|
|
|
|
.cfi_endproc
|
|
|
|
|
|
|
|
.cfi_def_cfa rsp, 8
|
2020-11-11 22:27:01 +08:00
|
|
|
# CHECK: [[#@LINE-1]]:1: error: this directive must appear between .cfi_startproc and .cfi_endproc directives
|
|
|
|
|
|
|
|
## Check we don't crash on unclosed frame scope.
|
|
|
|
.globl foo
|
|
|
|
foo:
|
|
|
|
.cfi_startproc
|
|
|
|
# CHECK: [[#@LINE+1]]:1: error: Unfinished frame!
|