[PATCH] D143760: [Codeview] Fix incorrect size determination for complex types.

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 06:00:42 PST 2023


hans added a comment.

In D143760#4132440 <https://reviews.llvm.org/D143760#4132440>, @dblaikie wrote:

> + at hansw for CV questions too.

Looking at the docs, it does seem like e.g. "32-bit Complex" refers to a type with 16-bit real + 16-bit imaginary in this context.

In the end, the proof of the pudding is what the debugger expects. @smerritt have you been able to check whether this is what the debugger wants?



================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:1798
+    // an individual component.
     switch (ByteSize) {
+    case 4:  STK = SimpleTypeKind::Complex16;  break;
----------------
What happens if ByteSize is 2 here now? Should we assert?


================
Comment at: llvm/test/DebugInfo/COFF/fortran-basic.ll:1
 ; RUN: llc < %s -filetype=obj | llvm-readobj - --codeview | FileCheck %s
 ;
----------------
I assume the file mode change is unintentional?


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

https://reviews.llvm.org/D143760



More information about the llvm-commits mailing list