djtodoro added inline comments.
================ Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:803 + if (Tag == dwarf::DW_TAG_typedef && DD->getDwarfVersion() >= 5) { + uint32_t AlignInBytes = DTy->getAlignInBytes(); ---------------- Please add a comment here. ================ Comment at: llvm/test/DebugInfo/X86/debug-info-template-align.ll:26 +; ModuleID = '/home/awpandey/tools/llvm/tools/clang/test/CodeGenCXX/debug-info-template-align.cpp' +source_filename = "/home/awpandey/tools/llvm/tools/clang/test/CodeGenCXX/debug-info-template-align.cpp" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" ---------------- I guess you don't want to share your local path. It is enough to write 'test.cpp' only. ================ Comment at: llvm/test/DebugInfo/X86/debug-info-template-align.ll:39 +; Function Attrs: nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + ---------------- So, we can get rid of the `#N`. ================ Comment at: llvm/test/DebugInfo/X86/debug-info-template-align.ll:41 + +attributes #0 = { noinline norecurse nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #1 = { nounwind readnone speculatable willreturn } ---------------- Usually, you don't need the attributes. ================ Comment at: llvm/test/DebugInfo/X86/debug-info-template-align.ll:48 + +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 10.0.0 (ssh://awpan...@idcvgits02.amd.com:29418/perfcompiler/er/llvm/cpu/clang 8b3533f5560dd219a0e6d346be2190623822bada) (llvm/cpu/llvm 61a342a7f3320d5517ba0bd012edc7cc908b36b7)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) +!1 = !DIFile(filename: "/home/awpandey/tools/llvm/tools/clang/test/CodeGenCXX/debug-info-template-align.cpp", directory: "/home/awpandey/tools/llvm/test/DebugInfo", checksumkind: CSK_MD5, checksum: "872e252efdfcb9480b4bfaf8437f58ab") ---------------- `producer: "clang version 10.0.0"` is enough. ================ Comment at: llvm/test/DebugInfo/X86/debug-info-template-align.ll:49 +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 10.0.0 (ssh://awpan...@idcvgits02.amd.com:29418/perfcompiler/er/llvm/cpu/clang 8b3533f5560dd219a0e6d346be2190623822bada) (llvm/cpu/llvm 61a342a7f3320d5517ba0bd012edc7cc908b36b7)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) +!1 = !DIFile(filename: "/home/awpandey/tools/llvm/tools/clang/test/CodeGenCXX/debug-info-template-align.cpp", directory: "/home/awpandey/tools/llvm/test/DebugInfo", checksumkind: CSK_MD5, checksum: "872e252efdfcb9480b4bfaf8437f58ab") +!2 = !{} ---------------- Usually, we put an artificial name for the dir, e.g. `/dir`. ================ Comment at: llvm/test/DebugInfo/X86/debug-info-template-align.ll:54 +!5 = !{i32 1, !"wchar_size", i32 4} +!6 = !{!"clang version 10.0.0 (ssh://awpan...@idcvgits02.amd.com:29418/perfcompiler/er/llvm/cpu/clang 8b3533f5560dd219a0e6d346be2190623822bada) (llvm/cpu/llvm 61a342a7f3320d5517ba0bd012edc7cc908b36b7)"} +!7 = distinct !DISubprogram(name: "main", scope: !8, file: !8, line: 12, type: !9, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) ---------------- ` "clang version 10.0.0"` is enough. ================ Comment at: llvm/test/DebugInfo/X86/debug-info-template-align.ll:56 +!7 = distinct !DISubprogram(name: "main", scope: !8, file: !8, line: 12, type: !9, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) +!8 = !DIFile(filename: "tools/clang/test/CodeGenCXX/debug-info-template-align.cpp", directory: "/home/awpandey/tools/llvm", checksumkind: CSK_MD5, checksum: "872e252efdfcb9480b4bfaf8437f58ab") +!9 = !DISubroutineType(types: !10) ---------------- `filename: test.c, directory: "/dir"` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70111/new/ https://reviews.llvm.org/D70111 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits