This is an archive of the discontinued LLVM Phabricator instance.

Add Swift enumerator value for CodeView::SourceLanguage
ClosedPublic

Authored by lanza on Feb 19 2019, 3:45 PM.

Details

Summary

Swift now generates PDBs for debugging on Windows. llvm and lldb
need a language type to properly handle the output emitted by swiftc.

Diff Detail

Event Timeline

lanza created this revision.Feb 19 2019, 3:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2019, 3:45 PM
compnerd added inline comments.Feb 19 2019, 4:35 PM
include/llvm/DebugInfo/CodeView/CodeView.h
161

I would say we should push this further down in case Microsoft adds a new language. Why not follow D's lead and use S?

rnk requested changes to this revision.Feb 19 2019, 4:36 PM

In the absence of guidance from someone at Microsoft, I would suggest not using 0x11, as they have probably already allocated that to some other language. I'd recommend doing what the D language people did and grab 'S'. If VS ever does something with this info, be aware that you will probably want to change which value we use here.

This revision now requires changes to proceed.Feb 19 2019, 4:36 PM
lanza updated this revision to Diff 187649.Feb 20 2019, 12:32 PM

Change value to 'S'

Sounds good to me. Are there any MSFT people we can tag to get feedback for this?

lanza marked an inline comment as done.Feb 20 2019, 12:34 PM
smeenai added inline comments.
include/llvm/DebugInfo/CodeView/CodeView.h
165

I'd either update the existing comment about D or add a new one for Swift.

lanza marked an inline comment as done.Feb 20 2019, 12:53 PM
rnk accepted this revision.Feb 20 2019, 12:57 PM

lgtm, but surely you want to add this to the MapDWLangToCVLang in CodeViewDebug.cpp as well, and perhaps add a test for it.

This revision is now accepted and ready to land.Feb 20 2019, 12:57 PM

Sounds good to me. Are there any MSFT people we can tag to get feedback for this?

Poke @neerajksingh @CJHebert

lanza closed this revision.Mar 11 2019, 2:08 PM