This is an archive of the discontinued LLVM Phabricator instance.

Deserialize Clang module search path from DWARF
ClosedPublic

Authored by aprantl on Feb 11 2019, 5:09 PM.

Details

Summary

This is an unfinished patch I'm working on that Raphael may find interesting. Posting to get early feedback and to avoid stepping on each others' toes.

rdar://problem/47970144

Diff Detail

Repository
rLLDB LLDB

Event Timeline

aprantl created this revision.Feb 11 2019, 5:09 PM
teemperor accepted this revision.Feb 12 2019, 8:28 AM

+1. That's a cleaner version of what I had to do in D58125, so feel free to commit when done. The code is similar enough that rebasing my patch on top shouldn't take too much time.

include/lldb/Symbol/SourceModule.h
14

Should also include lldb/Utility/ConstString.h otherwise this breaks the module build.

source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
332–333

path is unused.

This revision is now accepted and ready to land.Feb 12 2019, 8:28 AM

The change itself looks fine, just a few nits inline.

include/lldb/Symbol/SourceModule.h
25

Can you run clang-format on this? (It will add // namespace lldb_private here.)

source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
282–283

Can we make this i?

source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
941

Can we use a StringRef here?

shafik added a subscriber: shafik.Feb 12 2019, 2:39 PM
shafik added inline comments.
source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
282–283

Or perhaps path_index

aprantl updated this revision to Diff 186571.Feb 12 2019, 5:23 PM
aprantl retitled this revision from [WIP] Deserialize Clang module search path from DWARF to Deserialize Clang module search path from DWARF.

Almost final version. There's a silly bug that prevents the C Darwin module to be loaded now that I haven't been able to track down yet.

I think the problem was that I had an incompletely built libcxx in my build directory.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2019, 10:10 AM

I attempted to fix it in r353971, but I'm not sure.