diff options
| author | Reid Kleckner <rnk@google.com> | 2017-10-10 01:49:21 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-10-10 01:49:21 +0000 |
| commit | 97a2d5c42f24e2544cbddf16cd8841e71e9395e3 (patch) | |
| tree | de01cdb77fb77ac53f23b58fe9cd257998da6ee4 /llvm/test | |
| parent | 78eb8b912f331d968f69e0b1765449f640ca42a8 (diff) | |
| download | bcm5719-llvm-97a2d5c42f24e2544cbddf16cd8841e71e9395e3.tar.gz bcm5719-llvm-97a2d5c42f24e2544cbddf16cd8841e71e9395e3.zip | |
[MC] Properly diagnose badly scoped .cfi_ directives
Removes two report_fatal_errors.
Implement this by removing EmitCFICommon, and do the checking in
getCurrentDwarfFrameInfo. Have the callers check for null before
dereferencing it.
llvm-svn: 315264
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/MC/X86/cfi-scope-errors.s | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/cfi-scope-errors.s b/llvm/test/MC/X86/cfi-scope-errors.s new file mode 100644 index 00000000000..a61f817f741 --- /dev/null +++ b/llvm/test/MC/X86/cfi-scope-errors.s @@ -0,0 +1,18 @@ +# RUN: not llvm-mc %s -triple x86_64-linux -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error: + +# FIXME: Push source locations into diagnostics. + +.text +.cfi_def_cfa rsp, 8 +# CHECK: error: this directive must appear between .cfi_startproc and .cfi_endproc directives + +.cfi_startproc +nop + +.cfi_startproc +# CHECK: error: starting new .cfi frame before finishing the previous one +nop +.cfi_endproc + +.cfi_def_cfa rsp, 8 +# CHECK: error: this directive must appear between .cfi_startproc and .cfi_endproc directives |

