This is an archive of the discontinued LLVM Phabricator instance.

Generate codeview for array types
ClosedPublic

Authored by amccarth on Jun 7 2016, 4:37 PM.

Details

Summary

Creates codeview type records for arrays and adds a simple test for one.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth updated this revision to Diff 59967.Jun 7 2016, 4:37 PM
amccarth retitled this revision from to Generate codeview for array types.
amccarth updated this object.
amccarth added a reviewer: rnk.
amccarth added a subscriber: cfe-commits.
majnemer added inline comments.
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
785 ↗(On Diff #59967)

They don't use UInt64Quad? Surprising.

amccarth added inline comments.Jun 7 2016, 4:55 PM
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
785 ↗(On Diff #59967)

That's an excellent question. Let me check it out.

majnemer edited subscribers, added: llvm-commits; removed: cfe-commits.Jun 7 2016, 4:59 PM

-cfe-commits
+llvm-commits

rnk added inline comments.Jun 7 2016, 5:12 PM
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
788 ↗(On Diff #59967)

Huh, ArrayRecord really doesn't include info about the dimensions... oh well.

test/DebugInfo/COFF/types-array.ll
46 ↗(On Diff #59967)

I'd also CHECK for the Local block to see that it gets the right array type.

majnemer added inline comments.Jun 7 2016, 8:57 PM
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
785 ↗(On Diff #59967)

x64 MSVC 2015 Update 2 says:

Index type = T_UQUAD(0023)

x86 MSVC 2015 Update 2 says:

Index type = T_ULONG(0022)

Sounds like we should use UInt32Long and UInt64Quad.

amccarth marked 2 inline comments as done.Jun 8 2016, 9:39 AM
amccarth added inline comments.
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
788 ↗(On Diff #59967)

Are you asking me to add that info or are you just commenting?

amccarth updated this revision to Diff 60052.Jun 8 2016, 9:40 AM

Simpler test code (eliminated unnecessary function parameters).

Addressed comments.

rnk accepted this revision.Jun 8 2016, 9:57 AM
rnk edited edge metadata.

lgtm with nit

lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
788 ↗(On Diff #60052)

Just commenting.

test/DebugInfo/COFF/types-array.ll
85 ↗(On Diff #60052)

We can delete all the CHECK lines from here to the end, this is all line table info that should be covered elsewhere.

This revision is now accepted and ready to land.Jun 8 2016, 9:57 AM
This revision was automatically updated to reflect the committed changes.
amccarth marked an inline comment as done.