llvm-project/llvm/test/MC/COFF
Shiva Chen 2c864551df [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.
In order to set breakpoints on labels and list source code around
labels, we need collect debug information for labels, i.e., label
name, the function label belong, line number in the file, and the
address label located. In order to keep these information in LLVM
IR and to allow backend to generate debug information correctly.
We create a new kind of metadata for labels, DILabel. The format
of DILabel is

!DILabel(scope: !1, name: "foo", file: !2, line: 3)

We hope to keep debug information as much as possible even the
code is optimized. So, we create a new kind of intrinsic for label
metadata to avoid the metadata is eliminated with basic block.
The intrinsic will keep existing if we keep it from optimized out.
The format of the intrinsic is

llvm.dbg.label(metadata !1)

It has only one argument, that is the DILabel metadata. The
intrinsic will follow the label immediately. Backend could get the
label metadata through the intrinsic's parameter.

We also create DIBuilder API for labels to be used by Frontend.
Frontend could use createLabel() to allocate DILabel objects, and use
insertLabel() to insert llvm.dbg.label intrinsic in LLVM IR.

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

Patch by Hsiangkai Wang.

llvm-svn: 331841
2018-05-09 02:40:45 +00:00
..
ARM
alias.s
align-nops.s [X86] Don't use NOPL when the assembler is passed an empty CPU string. Update tests to force a CPU with NOPL 2017-12-18 21:37:27 +00:00
bad-expr.s Use @LINE in two more tests. 2017-07-06 21:33:23 +00:00
basic-coff-64.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
basic-coff.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
bigobj.py
bss.s
bss_section.ll
comm-align.s
comm.ll
comm.s
const-gv-with-rel-init.ll
cross-section-relative-err.s COFF: Produce an error on invalid pcrel relocs. 2017-06-23 04:07:44 +00:00
cross-section-relative.ll
cross-section-relative.s COFF: Produce an error on invalid pcrel relocs. 2017-06-23 04:07:44 +00:00
cv-compiler-info.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
cv-def-range-gap.s CodeView symbol dumper: use symbolic names for registers 2017-10-02 17:44:47 +00:00
cv-def-range.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
cv-empty-file-table.s [codeview] Avoid emitting an empty file checksum table 2016-06-08 17:50:29 +00:00
cv-empty-linetable.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
cv-errors.s Give an x86 assembler test a triple 2016-09-08 15:40:43 +00:00
cv-fpo-csrs.s [codeview] Implement FPO data assembler directives 2017-10-11 21:24:33 +00:00
cv-fpo-errors.s [codeview] Implement FPO data assembler directives 2017-10-11 21:24:33 +00:00
cv-fpo-setframe.s [codeview] Implement FPO data assembler directives 2017-10-11 21:24:33 +00:00
cv-inline-linetable-infloop.s [codeview] Change readobj symbol dumping format 2017-07-11 23:41:41 +00:00
cv-inline-linetable-unlikely.s [codeview] Change readobj symbol dumping format 2017-07-11 23:41:41 +00:00
cv-inline-linetable-unreachable.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
cv-inline-linetable.s [CodeView] Add line numbers for inlined call sites 2018-01-18 22:55:43 +00:00
cv-loc-cross-section.s Let test pass for builds that support X86, but do not default to it 2016-10-11 16:34:49 +00:00
cv-loc-unreachable.s [codeview] Ignore .cv_loc directives at the end of a function 2018-04-25 23:34:15 +00:00
cv-loc.s [codeview] Add new directives to record inlined call site line info 2016-09-07 16:15:31 +00:00
diff.s [MC] Always emit relocations for same-section function references 2018-03-14 19:24:32 +00:00
directive-section-characteristics.ll
early-dce.s
eh-frame.s
feat00.s
file.s
global_ctors_dtors.ll
initialised-data.ll
invalid-def.s
invalid-endef.s
invalid-scl-range.s
invalid-scl.s
invalid-type-range.s
invalid-type.s
ir-to-imgrel.ll
label-undefined.s
linker-options.ll IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata. 2017-06-12 20:10:48 +00:00
linkonce-invalid.s
linkonce.s
lit.local.cfg
lset0.s
module-asm.ll
offset.s
pr23025.s
pr28462.s [MC, COFF] Permit a variable to be redefined 2016-07-08 21:54:16 +00:00
rdata.ll
relax-reloc.s Don't crash trying to relax 32 loads on COFF. 2016-07-07 14:00:07 +00:00
relocation-imgrel.s
safeseh.s
secidx.s
secrel-variant.s
secrel32-undef.s [MC] Allow assembling .secidx and .secrel32 for undefined symbols 2017-06-22 21:02:14 +00:00
secrel32.s
section-comdat-conflict.s
section-comdat-conflict2.s
section-comdat.s MC/COFF: Do not emit forward associative section referenceds. 2017-02-17 17:32:54 +00:00
section-invalid-flags.s
section-name-encoding.s
section-passthru-flags.s
section.s [MC] Handle discardable COFF sections in assembly 2016-09-14 22:41:50 +00:00
seh-align1.s
seh-align2.s
seh-align3.s
seh-linkonce.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
seh-section-2.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
seh-section.s
seh-stackalloc-zero.s [SEH] Use reportError instead of report_fatal_error for bad directives 2017-10-10 01:26:25 +00:00
seh.s
simple-fixups.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
stdin.s
switch-relocations.ll
symbol-alias.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
symbol-fragment-offset-64.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
symbol-fragment-offset.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
symidx.s Reland "Emit Function IDs table for Control Flow Guard" 2018-01-09 23:49:30 +00:00
temporary-alias.s
timestamp.s
tricky-names.ll MC intel asm parser: Allow @ at the start of function names. 2018-03-12 12:47:27 +00:00
weak-alias-local.s coff: fix weak alias to local. 2016-05-26 20:31:00 +00:00
weak-val.s coff: fix the section of weak symbols. 2016-05-26 18:48:23 +00:00
weak.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00