[PATCH] D21011: [codeview] Add complex record type translation

Amjad Aboud via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 20:32:44 PDT 2016


aaboud created this revision.
aaboud added reviewers: rnk, majnemer.
aaboud added a subscriber: llvm-commits.

Improved the support of records (classes and structures) to include virtual and non-virtual methods,  virtual and non-virtual inheritance, bitfield members.

Major changes included in the patch
1. Introduced "ClassInfo" container that is used to collect record info from current debug info metadata that is needed to emit CodeView records.
2. Extended the TypeIndices map to have another dimension, i.e. from {DINode -> TypeIndex} to {DIType -> {DINode -> TypeIndex} }.
  - This is needed as DISubroutine might be shared for static methods from different classes as well as regular functions, e.g. all three functions bellow (f1, f2, and f3) will have same DISubroutine.

```
void f1() {}
class A {
  static void f2() {}
};
class B {
  static void f3() {}
};
```





http://reviews.llvm.org/D21011

Files:
  include/llvm/DebugInfo/CodeView/TypeRecord.h
  lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  lib/CodeGen/AsmPrinter/CodeViewDebug.h
  test/DebugInfo/COFF/types-basic.ll
  test/DebugInfo/COFF/types-data-members.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21011.59686.patch
Type: text/x-patch
Size: 46515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160606/658bafb8/attachment.bin>


More information about the llvm-commits mailing list