Based on Pavel's feedback, here is a different approach, where the "master" debug map module is passed in explicitly to ParseXcodeSDK(). This allows updating both the source remapping dictionary of the OSO (needed for source listings) and the debug map (needed to remap Clang compiler options in swift-lldb).
For Swift LLDB (but potentially also for module support in Clang-land) I need a way to accumulate the path remappings produced by Module::RegisterXcodeSDK(). Unfortunately there is no way to go from an executable's Module to the auxiliary modules that represent the individual OSO object files of a SymbolFileDWARFDebugMap.
Here is a proposed API that would allow me to do this. Does this look reasonable?
I don't think you need to pass thread the Module argument everywhere. The module you want should be available as comp_unit.GetModule(). SymbolFileDWARFDebugMap::ParseCompileUnitAtIndex ensures that the CUs are created pointing to the "main" module.