@@ -637,22 +637,25 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
637637 if (Val != DIModuleCache.end ())
638638 return cast<llvm::DIModule>(Val->second );
639639
640+ std::string RemappedIncludePath = DebugPrefixMap.remapPath (IncludePath);
641+
640642 // For Clang modules / PCH, create a Skeleton CU pointing to the PCM/PCH.
641643 bool CreateSkeletonCU = !ASTFile.empty ();
642644 bool IsRootModule = !Parent;
643645 if (CreateSkeletonCU && IsRootModule) {
644646 llvm::DIBuilder DIB (M);
645647 DIB.createCompileUnit (IGM.ObjCInterop ? llvm::dwarf::DW_LANG_ObjC
646648 : llvm::dwarf::DW_LANG_C99,
647- DIB.createFile (Name, IncludePath ),
649+ DIB.createFile (Name, RemappedIncludePath ),
648650 TheCU->getProducer (), true , StringRef (), 0 , ASTFile,
649651 llvm::DICompileUnit::FullDebug, Signature);
650652 DIB.finalize ();
651653 }
652654
653655 StringRef Sysroot = IGM.Context .SearchPathOpts .SDKPath ;
654656 llvm::DIModule *M =
655- DBuilder.createModule (Parent, Name, ConfigMacros, IncludePath, Sysroot);
657+ DBuilder.createModule (Parent, Name, ConfigMacros, RemappedIncludePath,
658+ Sysroot);
656659 DIModuleCache.insert ({Key, llvm::TrackingMDNodeRef (M)});
657660 return M;
658661 }
0 commit comments