1target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 2target triple = "x86_64-unknown-linux-gnu" 3 4; T2 is the non-opaque struct required to trigger the uniqued T2.0 and T3.0 to 5; respectively T2 and T3 in the destination module. 6%"T2" = type { ptr } 7%"T3" = type opaque 8 9; Use/refer to T2 so it gets added as an IdentifiedStructType. The debug 10; reference to !6 is required to transitively load the metadata !5. 11define void @a(%"T2") !dbg !6 { 12 ret void 13} 14 15!llvm.module.flags = !{!0, !1} 16!llvm.dbg.cu = !{!2} 17!0 = !{i32 1, !"ThinLTO", i32 0} 18!1 = !{i32 2, !"Debug Info Version", i32 3} 19!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, retainedTypes: !4) 20!3 = !DIFile(filename: "f2", directory: "") 21!4 = !{!5} 22 23; This DICompositeType refers to !5 in type-mapping-bug3.ll 24!5 = !DICompositeType(tag: DW_TAG_structure_type, flags: DIFlagFwdDecl, identifier: "SHARED") 25 26!6 = distinct !DISubprogram(unit: !2) 27