[PATCH] D66352: Debug Info: Support for DW_AT_export_symbols for anonymous structs

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 01:50:07 PDT 2019


djtodoro added a comment.

Thanks for this (just added a few nitpicks inside).



================
Comment at: test/Assembler/export-symbol-anonymous-class.ll:20
+!llvm.dbg.cu = !{!2}
+!llvm.ident = !{!18}
+
----------------
now: `!llvm.ident = !{!16}`


================
Comment at: test/Assembler/export-symbol-anonymous-class.ll:24
+!1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 5, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 10.0.0 (https://git.llvm.org/git/clang.git/ a16001b1bd2c421174838df17f629807c62e7d1b) (https://git.llvm.org/git/llvm.git/ dbc62cefba151b78de3779348509c27581c58d72)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: GNU)
+!3 = !DIFile(filename: "simple_anon_class.cpp", directory: "/Users/shafik/code")
----------------
You can delete all the verbose info about the compiler version as following:
`distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 10.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: GNU)`


================
Comment at: test/Assembler/export-symbol-anonymous-class.ll:25
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 10.0.0 (https://git.llvm.org/git/clang.git/ a16001b1bd2c421174838df17f629807c62e7d1b) (https://git.llvm.org/git/llvm.git/ dbc62cefba151b78de3779348509c27581c58d72)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: GNU)
+!3 = !DIFile(filename: "simple_anon_class.cpp", directory: "/Users/shafik/code")
+!4 = !{}
----------------
This ca be just a `/dir` as following:
`!DIFile(filename: "simple_anon_class.cpp", directory: "/dir")`


================
Comment at: test/Assembler/export-symbol-anonymous-class.ll:38
+!15 = !{i32 2, !"Debug Info Version", i32 3}
+!18 = !{!"clang version 10.0.0 (https://git.llvm.org/git/clang.git/ a16001b1bd2c421174838df17f629807c62e7d1b) (https://git.llvm.org/git/llvm.git/ dbc62cefba151b78de3779348509c27581c58d72)"}
----------------
In order to keep the order of the matadata:
`!16 = !{!"clang version 10.0.0"}`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66352/new/

https://reviews.llvm.org/D66352





More information about the llvm-commits mailing list