diff options
author | Scott Linder <scott@scottlinder.com> | 2018-02-23 23:01:06 +0000 |
---|---|---|
committer | Scott Linder <scott@scottlinder.com> | 2018-02-23 23:01:06 +0000 |
commit | 16c7bdaf3245d23b9b441144f5efb610e2044927 (patch) | |
tree | 870f3b5c5c606b19951cb4433f3887825bc61e56 /llvm/test/CodeGen/Generic | |
parent | 5e2f6ba51e89c9b9625902f0c36493ad46e46a3b (diff) | |
download | bcm5719-llvm-16c7bdaf3245d23b9b441144f5efb610e2044927.tar.gz bcm5719-llvm-16c7bdaf3245d23b9b441144f5efb610e2044927.zip |
[DebugInfo] Support DWARF v5 source code embedding extension
In DWARF v5 the Line Number Program Header is extensible, allowing values with
new content types. In this extension a content type is added,
DW_LNCT_LLVM_source, which contains the embedded source code of the file.
Add new optional attribute for !DIFile IR metadata called source which contains
source text. Use this to output the source to the DWARF line table of code
objects. Analogously extend METADATA_FILE in Bitcode and .file directive in ASM
to support optional source.
Teach llvm-dwarfdump and llvm-objdump about the new values. Update the output
format of llvm-dwarfdump to make room for the new attribute on file_names
entries, and support embedded sources for the -source option in llvm-objdump.
Differential Revision: https://reviews.llvm.org/D42765
llvm-svn: 325970
Diffstat (limited to 'llvm/test/CodeGen/Generic')
-rw-r--r-- | llvm/test/CodeGen/Generic/dwarf-md5.ll | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/Generic/dwarf-md5.ll b/llvm/test/CodeGen/Generic/dwarf-md5.ll index 001a67e90ea..b9977200de1 100644 --- a/llvm/test/CodeGen/Generic/dwarf-md5.ll +++ b/llvm/test/CodeGen/Generic/dwarf-md5.ll @@ -16,13 +16,21 @@ ; ASM: .file 1 ".{{/|\\\\}}t1.h" md5 "11111111111111111111111111111111" ; ASM: .file 2 ".{{/|\\\\}}t2.h" md5 "22222222222222222222222222222222" -; OBJ-4: Dir Mod Time File Len File Name -; OBJ-4: file_names[ 1] 1 0x00000000 0x00000000 "t1.h" -; OBJ-4: file_names[ 2] 1 0x00000000 0x00000000 "t2.h" - -; OBJ-5: Dir MD5 Checksum File Name -; OBJ-5: file_names[ 0] 1 11111111111111111111111111111111 "t1.h" -; OBJ-5: file_names[ 1] 1 22222222222222222222222222222222 "t2.h" +; OBJ-4: file_names[ 1]: +; OBJ-4-NEXT: name: "t1.h" +; OBJ-4-NEXT: dir_index: 1 +; OBJ-4: file_names[ 2]: +; OBJ-4-NEXT: name: "t2.h" +; OBJ-4-NEXT: dir_index: 1 + +; OBJ-5: file_names[ 0]: +; OBJ-5-NEXT: name: "t1.h" +; OBJ-5-NEXT: dir_index: 1 +; OBJ-5-NEXT: md5_checksum: 11111111111111111111111111111111 +; OBJ-5: file_names[ 1]: +; OBJ-5-NEXT: name: "t2.h" +; OBJ-5-NEXT: dir_index: 1 +; OBJ-5-NEXT: md5_checksum: 22222222222222222222222222222222 ; ModuleID = 't.c' source_filename = "t.c" |