llvm-project/llvm/test/MC/MachO
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
..
AArch64 CodeGen: Use PLT relocations for relative references to unnamed_addr functions. 2016-04-22 20:40:10 +00:00
ARM [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
PowerPC
absolute.s
absolutize.s
alias.s [MachO] Fix codegen of alias of alias. 2017-06-08 20:49:03 +00:00
altentry.s [MachO] Extend the alt_entry support for aliases added in r263521 to 2016-03-15 04:20:49 +00:00
bad-darwin-x86_64-32-bit-abs-addr.s
bad-darwin-x86_64-diff-relocs.s
bad-darwin-x86_64-reloc-expr.s
bad-dollar.s
bad-indirect-symbols.s
bad-macro.s
bss.s
coal-sections-x86_64.s
comm-1.s
cstexpr-gotpcrel-32.ll
cstexpr-gotpcrel-64.ll
darwin-complex-difference.s
darwin-version-min-load-command.s Add LC_BUILD_VERSION load command 2017-01-23 20:07:55 +00:00
darwin-x86_64-diff-reloc-assign-2.s
darwin-x86_64-diff-reloc-assign.s
darwin-x86_64-diff-relocs.s
darwin-x86_64-nobase-relocs.s
darwin-x86_64-reloc-offsets.s
darwin-x86_64-reloc.s
data.s
debug_frame.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
diff-with-two-sections.s MC/AsmPrinter: Reduce code duplication. 2017-12-14 03:59:24 +00:00
direction_labels.s
eh-frame-reloc.s
eh_symbol.s
empty-twice.ll Add missing emissionKind flags to the DICompileUnits of several old testcases. 2016-04-01 22:18:43 +00:00
file.s [MC/Dwarf] Use the older DWARF linetables format on Darwin. 2017-12-07 00:57:25 +00:00
gen-dwarf-cpp.s [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
gen-dwarf-macro-cpp.s [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
gen-dwarf-producer.s llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
gen-dwarf.s [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
i386-large-relocations.s
indirect-symbols.s
jcc.s
lcomm-attributes.s
linker-option-1.s
linker-option-2.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
lit.local.cfg
loc.s [MC] Allow .file directives to be out-of-order 2017-12-14 18:46:43 +00:00
osx-version-min-load-command.s
pcrel-to-other-section.s
pr19185.s
previous.s
pushsection.s
relax-jumps.s
relax-recompute-align.s
reloc-diff.s
reloc-pcrel-offset.s
reloc-pcrel.s
reloc.s
section-align-1.s
section-align-2.s
section-attributes.s
section-flags.s
string-table.s
symbol-diff.s
symbol-flags.s
symbol-indirect.s
symbols-1.s
tbss.s
tdata.s
temp-labels.s
thread_init_func.s
tls.s
tlv-bss.ll
tlv-reloc.s
tlv.s
undefined-directional.s AsmParser: record "# line file" context to calculate location for diag 2016-04-13 19:46:54 +00:00
values.s
variable-errors.s
variable-exprs.s [MachO] Fix codegen of alias of alias. 2017-06-08 20:49:03 +00:00
weakdef.s
x86-data-in-code.s MachO: enable .data_region directives everywhere 2016-04-21 23:00:17 +00:00
x86_32-optimal_nop.s [X86] Emit 11-byte or 15-byte NOPs on recent AMD targets, else default to 10-byte NOPs (PR22965) 2018-01-29 21:24:31 +00:00
x86_32-scattered-reloc-fallback.s
x86_32-sections.s
x86_32-symbols.s
x86_64-mergeable.s
x86_64-reloc-arithmetic.s
x86_64-sections.s
x86_64-symbols.s
zerofill-1.s
zerofill-2.s
zerofill-3.s
zerofill-4.s
zerofill-5.s
zerofill-sect-align.s