This is an archive of the discontinued LLVM Phabricator instance.

[codeview] Write LF_UDT_SRC_LINE records (PR28251)
ClosedPublic

Authored by hans on Jun 22 2016, 1:43 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

hans updated this revision to Diff 61604.Jun 22 2016, 1:43 PM
hans retitled this revision from to [codeview] Write LF_UDT_SRC_LINE records (PR28251).
hans updated this object.
hans added a reviewer: rnk.
hans added a subscriber: llvm-commits.

I checked that MSVC does put an Id of 0x0 in the StringId's.

Do we need to emit these for typedefs too?

hans added a comment.Jun 22 2016, 2:00 PM

Do we need to emit these for typedefs too?

I don't know. I tried this:

typedef int foo;
void f(foo x) {
}

and msvc doesn't emit any UdtSourceLine record for foo.

rnk accepted this revision.Jun 22 2016, 2:15 PM
rnk edited edge metadata.

lgtm

I think going forward we should try to use more filecheck wildcards so that we don't have to update tests as much when all the typeids shift by one. See virtual-method-kinds.ll for example. That's out of scope here obviously.

lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
1612 ↗(On Diff #61604)

The next thing you should do is toss some of these complete type indices on the GlobalUDTs or LocalUDTs list. MSVC builds S_UDT records for structs, and we don't do that yet. I guess this should be a separate change, and I just got the two things confused and filed them together.

This revision is now accepted and ready to land.Jun 22 2016, 2:15 PM
This revision was automatically updated to reflect the committed changes.