llvm-project/llvm/test/MC/ELF
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 [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
abs.s
alias-reloc.s
alias-to-local.s
alias.s
align-bss.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
align-size.s
align-text.s
align-zero.s [MC/ELF] Accept zero for .align directive 2015-09-08 18:59:47 +00:00
align.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
bad-expr.s Add a common error checking for some invalid expressions. 2017-06-22 17:25:35 +00:00
bad-expr2.s Make this test a bit more strict. NFC. 2017-06-20 21:11:58 +00:00
bad-expr3.s Use @LINE in two more tests. 2017-07-06 21:33:23 +00:00
bad-relocation.s
bad-section.s
basic-elf-32.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
basic-elf-64.s [llvm-mc] - Produce R_X86_64_PLT32 for "call/jmp foo". 2018-02-20 10:17:57 +00:00
bracket-exprs.s
bracket.s
bss-large.ll
bss.ll
call-abs.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
cfi-adjust-cfa-offset.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-advance-loc2.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-def-cfa-offset.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-def-cfa-register.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-def-cfa.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-escape.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-large-model.s Add REQUIRES lines for the targets being checked in this test. 2018-03-24 02:56:58 +00:00
cfi-offset.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-reg.s
cfi-register.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-rel-offset.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-rel-offset2.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-remember.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-restore.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-same-value.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-sections.s
cfi-signal-frame.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-undefined.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-version.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
cfi-window-save.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi-zero-addr-delta.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
cfi.s Use SHT_X86_64_UNWIND on every OS. 2015-11-06 13:35:35 +00:00
comdat-declaration-errors.s [MC] - Disallow invalid section groups declarations. 2017-12-25 09:41:00 +00:00
comdat-dup-group-name.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
comdat-name-number.s [llvm] Fix mc tests 2018-03-12 23:36:25 +00:00
comdat-reloc.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
comdat.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
common-error1.s [Assembler] Make fatal assembler errors non-fatal 2015-11-17 10:00:43 +00:00
common-error2.s [Assembler] Make fatal assembler errors non-fatal 2015-11-17 10:00:43 +00:00
common-error3.s
common-redeclare.s
common.s
common2.s Simplify local common output. 2015-11-03 18:50:51 +00:00
comp-dir.s llvm-dwarfdump: Make -brief the default and add a -verbose option instead. 2017-09-11 23:05:20 +00:00
compression.s llvm-dwarfdump: Replace -debug-dump=sect option with individual options. 2017-09-11 22:59:45 +00:00
debug-file-options.s [DWARFv5] Fuss with asm syntax for conveying MD5 checksum. 2018-04-11 15:14:05 +00:00
debug-line.s Re-submit r289925 (Update .debug_line section version to match DWARF version) 2017-12-04 21:27:46 +00:00
debug-line2.s Re-submit r289925 (Update .debug_line section version to match DWARF version) 2017-12-04 21:27:46 +00:00
debug-loc.s Re-submit r289925 (Update .debug_line section version to match DWARF version) 2017-12-04 21:27:46 +00:00
debug-md5-err.s [DWARFv5] Fuss with asm syntax for conveying MD5 checksum. 2018-04-11 15:14:05 +00:00
debug-md5.s [DWARFv5] Fuss with asm syntax for conveying MD5 checksum. 2018-04-11 15:14:05 +00:00
debug-source.s Reapply "[DWARFv5] Emit file 0 to the line table." 2018-03-29 17:16:41 +00:00
diff.s
diff2.s
discriminator.s Re-submit r289925 (Update .debug_line section version to match DWARF version) 2017-12-04 21:27:46 +00:00
div-by-zero.s [MC] Don't crash on modulo by zero (PR35650) 2018-02-22 18:06:48 +00:00
dot-symbol-assignment.s Simplify .org processing and make it a bit more powerful. 2015-11-04 23:50:29 +00:00
dwarf-file0.s Specify REQUIRES: default_triple in a few tests 2018-04-26 19:15:25 +00:00
elf_directive_previous.s
elf_directive_section.s
empty-dwarf-lines.s Re-submit r289925 (Update .debug_line section version to match DWARF version) 2017-12-04 21:27:46 +00:00
empty-twice.ll [llc/opt] Add an option to run all passes twice 2015-12-04 21:56:46 +00:00
empty.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
entsize.ll
entsize.s
fde.s [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
file-double.s
file.s
gen-dwarf.s [NFC] fix trivial typos in comments and documents 2018-01-29 05:17:03 +00:00
global-offset.s
gnu-type-diagnostics.s
gnu-type.s
got-relaxed-i386.s Add initial support for R_386_GOT32X. 2016-07-06 21:19:11 +00:00
got-relaxed-no-relax.s Change the default of -relax-relocations. 2016-06-17 17:04:56 +00:00
got-relaxed-rex.s Change the default of -relax-relocations. 2016-06-17 17:04:56 +00:00
got-relaxed.s Change the default of -relax-relocations. 2016-06-17 17:04:56 +00:00
got.s
ident.s
ifunc-reloc.s [llvm-mc] - Produce R_X86_64_PLT32 for "call/jmp foo". 2018-02-20 10:17:57 +00:00
invalid-symver.s
lcomm.s
leb128.s
lit.local.cfg
local-reloc.s
many-sections-2.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
many-sections-3.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
many-sections.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
merge.s
metadata-declaration-errors.s [MC] - Stop ignoring invalid meta data symbols. 2017-12-31 07:41:02 +00:00
multiple-different-symver.s ELFObjectWriter: Allow one unique symver per symbol 2018-04-27 20:32:34 +00:00
multiple-equiv-symver.s ELFObjectWriter: Allow one unique symver per symbol 2018-04-27 20:32:34 +00:00
n_bytes.s
no-fixup.s
no-reloc.s
nocompression.s [test] Fix MC/ELF/nocompression.s 2018-04-22 08:46:27 +00:00
noexec.s
norelocation.s
offset.s
org.s
pic-diff.s
plt.s
popsection.s Remove unnecessary dependency on section and string positions. 2015-11-03 19:24:17 +00:00
pr9292.s
pr19430.s
pr19582.s
relax-all-flag.s
relax-arith.s Revert r265817 2016-04-08 18:15:37 +00:00
relax-arith2.s Revert r265817 2016-04-08 18:15:37 +00:00
relax-arith3.s Revert r265817 2016-04-08 18:15:37 +00:00
relax-arith4.s Revert r265817 2016-04-08 18:15:37 +00:00
relax-crash.s
relax.s
reloc-same-name-section.s
relocation-386.s Add initial support for R_386_GOT32X. 2016-07-06 21:19:11 +00:00
relocation-pc.s ELF can handle some relocations of the form -sym + constant. 2015-11-02 19:13:59 +00:00
relocation-tls.s [MC] support TLSDESC and TLSCALL / GNU2 tls dialect 2016-04-09 20:32:33 +00:00
relocation.s Accept subtractions involving a weak symbol. 2016-01-20 18:57:48 +00:00
rename.s
section-metadata-err1.s Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
section-metadata-err2.s Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
section-metadata-err3.s Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
section-metadata-err4.s Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
section-numeric-flag.s Add missing triple target for numeric section flag test 2016-12-15 10:20:48 +00:00
section-numeric-invalid-type.s Add llvm::object::getELFSectionTypeName(). 2017-05-02 14:04:52 +00:00
section-numeric-type.s [MC] Accept a numeric value as an ELF section header's type 2017-03-10 08:22:13 +00:00
section-quoting.s
section-sym-err.s Disallow redefinition of section symbols. 2017-02-24 21:44:58 +00:00
section-sym-err2.s Disallow redefinition of section symbols. 2017-02-24 21:44:58 +00:00
section-sym.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
section-sym2.s
section-unique-err1.s
section-unique-err2.s
section-unique-err3.s
section-unique-err4.s
section-unique.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
section.s CodeGen: support an extension to pass linker options on ELF 2018-01-30 16:29:29 +00:00
set.s
size.s
sleb.s Convert tests under MC/ELF from macho-dump to llvm-readobj. 2015-08-14 15:16:37 +00:00
strtab-suffix-opt.s Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
subsection.s
subtraction-error.s
symbol-names.s
symver-msvc.s
symver-pr23914.s
symver.s
tls-i386.s
tls.s
type-propagate.s
type.s
uleb-ehtable.s [MC] Fix assembler infinite loop on EH table using LEB padding. 2018-02-01 00:25:19 +00:00
uleb.s Convert tests under MC/ELF from macho-dump to llvm-readobj. 2015-08-14 15:16:37 +00:00
undef-temp.s
undef.s
undefined-directional.s AsmParser: record "# line file" context to calculate location for diag 2016-04-13 19:46:54 +00:00
version.s
weak-diff.s [llvm-mc] - Produce R_X86_64_PLT32 for "call/jmp foo". 2018-02-20 10:17:57 +00:00
weak-relocation.s [llvm-mc] - Produce R_X86_64_PLT32 for "call/jmp foo". 2018-02-20 10:17:57 +00:00
weak.s
weakref-plt.s
weakref-reloc.s [llvm-mc] - Produce R_X86_64_PLT32 for "call/jmp foo". 2018-02-20 10:17:57 +00:00
weakref.s
x86_64-reloc-sizetest.s
zero.s