This is an archive of the discontinued LLVM Phabricator instance.

Correctly initialize the DW_AT_comp_dir attribute of Clang module skeleton CUs
ClosedPublic

Authored by aprantl on Mar 18 2020, 11:49 AM.

Details

Summary

Before this patch a Clang module skeleton CU would have a DW_AT_comp_dir pointing to the directory of the module map file, and this information was not used by anyone. Even worse, LLDB actually resolves relative DWO paths by appending it to DW_AT_comp_dir. This patch sets it to the same directory that is used as the main CU's compilation directory, which would make the LLDB code work.

Diff Detail

Event Timeline

aprantl created this revision.Mar 18 2020, 11:49 AM
JDevlieghere accepted this revision.Mar 18 2020, 4:14 PM
This revision is now accepted and ready to land.Mar 18 2020, 4:14 PM
probinson added inline comments.
clang/lib/CodeGen/CGDebugInfo.cpp
2499

The isOptimized parameter changed from true to false?

aprantl marked an inline comment as done.Mar 20 2020, 10:35 AM
aprantl added inline comments.
clang/lib/CodeGen/CGDebugInfo.cpp
2499

Good catch, that was a drive-by fix. It has no meaning in the skeleton CU so we might as well not set it. Should be a separate commit though.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2020, 2:40 PM