This is an archive of the discontinued LLVM Phabricator instance.

[codeview] Look through typedefs in getCompleteTypeIndex
ClosedPublic

Authored by rnk on Dec 3 2018, 3:28 PM.

Details

Summary

Any time a symbol record, whether it's S_UDT, S_LOCAL, or S_[GL]DATA32,
references a record type, it should use the complete type index, even if
there's a typedef in the way.

Fixes PR39853.

Event Timeline

rnk created this revision.Dec 3 2018, 3:28 PM
aganea added a comment.Dec 4 2018, 7:35 AM

Fixes PR39853.

The issue I was discussing with Zachary occurs when using cl-generated OBJs with LLD (we haven't deployed clang in production yet).
Shouldn't there be something in LLD to completly fix PR39853? Microsoft seems to be doing a post-merge pass to resolve forward-declared UDTs, see here and here.

llvm/test/DebugInfo/COFF/udts-complete.ll
13

== 4?

zturner accepted this revision.Dec 4 2018, 11:48 AM
This revision is now accepted and ready to land.Dec 4 2018, 11:48 AM
rnk marked an inline comment as done.Dec 11 2018, 3:01 PM

Fixes PR39853.

The issue I was discussing with Zachary occurs when using cl-generated OBJs with LLD (we haven't deployed clang in production yet).
Shouldn't there be something in LLD to completly fix PR39853? Microsoft seems to be doing a post-merge pass to resolve forward-declared UDTs, see here and here.

I guess it depends how we want to scope the PR. I'll just say this fixes the compiler side of it, i.e. makes clang generate the same debug info as msvc.

llvm/test/DebugInfo/COFF/udts-complete.ll
13

Heh, I think I actually commented that out and compiled with -fstandalone-debug, which you can see below from emissionKind: FullDebug. I'll fix it.

This revision was automatically updated to reflect the committed changes.