[PATCH] D39503: Let replaceVTableHolder accept any type

Tom Tromey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 09:58:00 PDT 2017


tromey added inline comments.


================
Comment at: test/DebugInfo/Generic/containing-type-extension.ll:24
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (trunk 185475)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !15, imports: !2)
+!1 = !DIFile(filename: "CodeGen/dwarf-version.c", directory: "test")
----------------
aprantl wrote:
> tromey wrote:
> > aprantl wrote:
> > > Why not use DW_LANG_Rust and an actual example?
> > It seemed better to me to have a minimal example; but I can make the DW_LANG_Rust change pretty easily.
> My point was: it would be helpful to have actual Rust debug info code in the testcase to serve as a reminder hat kind of use-cases we need to support to guide future development/refactoring of LLVM. Having a minimal testcase is of course good, too, but I think in this case it would be nice to have an example of actual well-formed Rust debug info highlighting what Rust needs (and how it is different from clang). Can you generate a similarly small testcase from Rust?
Sure, I can.  The one in the patch was made by minimizing a rustc-generated file.  In one real .ll I have:

```
!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "vtable", file: !2, size: 64, align: 64, flags: DIFlagArtificial, elements: !4, vtableHolder: !5, identifier: "vtable")
...
!5 = !DIBasicType(name: "f64", size: 64, encoding: DW_ATE_float)
```

... which I think is essentially the same as what's in the current test:

```
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
...
!12 = !DICompositeType(tag: DW_TAG_structure_type, name: "vtable", size: 8, align: 8, elements: !2, identifier: "vtable", vtableHolder: !8)
```



https://reviews.llvm.org/D39503





More information about the llvm-commits mailing list