1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/MC/COFF/cv-empty-linetable.s

84 lines
1.6 KiB
ArmAsm
Raw Normal View History

# RUN: llvm-mc -filetype=obj -triple i686-pc-win32 < %s | llvm-readobj -codeview - | FileCheck %s
.text
.def @feat.00;
.scl 3;
.type 0;
.endef
.globl @feat.00
@feat.00 = 1
.def _f;
.scl 2;
.type 32;
.endef
.globl _f
.p2align 4, 0x90
_f: # @f
Lfunc_begin0:
# BB#0: # %entry
.cv_file 1 "cv-empty-linetable.s"
[codeview] Add new directives to record inlined call site line info Summary: Previously we were trying to represent this with the "contains" list of the .cv_inline_linetable directive, which was not enough information. Now we directly represent the chain of inlined call sites, so we know what location to emit when we encounter a .cv_loc directive of an inner inlined call site while emitting the line table of an outer function or inlined call site. Fixes PR29146. Also fixes PR29147, where we would crash when .cv_loc directives crossed sections. Now we write down the section of the first .cv_loc directive, and emit an error if any other .cv_loc directive for that function is in a different section. Also fixes issues with discontiguous inlined source locations, like in this example: volatile int unlikely_cond = 0; extern void __declspec(noreturn) abort(); __forceinline void f() { if (!unlikely_cond) abort(); } int main() { unlikely_cond = 0; f(); unlikely_cond = 0; } Previously our tables gave bad location information for the 'abort' call, and the debugger wouldn't snow the inlined stack frame for 'f'. It is important to emit good line tables for this code pattern, because it comes up whenever an asan bug occurs in an inlined function. The __asan_report* stubs are generally placed after the normal function epilogue, leading to discontiguous regions of inlined code. Reviewers: majnemer, amccarth Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24014 llvm-svn: 280822
2016-09-07 18:15:31 +02:00
.cv_func_id 1
.cv_loc 1 1 3 15 is_stmt 0
jmp _g # TAILCALL
Lfunc_end0:
.section .debug$T,"dr"
.long 4
.short 6
.short 4609
.long 0
.short 14
.short 4104
.asciz "\003\000\000\000\000\000\000\000\000\020\000"
.short 14
.short 5633
.asciz "\000\000\000\000\001\020\000"
.ascii "fn1"
.byte 0
.short 38
.short 5633
.asciz "\000\000\000\000\001\020\000"
.ascii "??__Fa@?1??fn1@@YAXXZ@YAXXZ"
.byte 0
.short 26
.short 5633
.asciz "\000\000\000\000\001\020\000"
.ascii "vector::~vector"
.byte 0
.section .debug$S,"dr"
.long 4
.long 241 # Symbol subsection for f
.long Ltmp1-Ltmp0
Ltmp0:
.short Ltmp3-Ltmp2
Ltmp2:
.short 4423
.zero 12
.long Lfunc_end0-_f
.zero 12
.secrel32 _f
.secidx _f
.byte 0
.byte 102
.byte 0
Ltmp3:
.short Ltmp5-Ltmp4
Ltmp4:
.short 4429
.asciz "\000\000\000\000\000\000\000\000\004\020\000"
Ltmp5:
.short 2
.short 4430
.short 2
.short 4431
Ltmp1:
.zero 3
.cv_linetable 0, _f, Lfunc_end0
.cv_filechecksums # File index to string table offset subsection
.cv_stringtable # String table
# CHECK: FunctionLineTable [
# CHECK: LinkageName: _f
# CHECK: Flags: 0x0
# CHECK: CodeSize: 0x5
# CHECK: ]