[clang] [Clang][DebugInfo] Use CGDebugInfo::createFile in CGDebugInfo::CreateCompileUnit (#83174) (PR #83175)

Aleksei Vetrov via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 09:10:03 PST 2024


================
@@ -628,9 +628,8 @@ void CGDebugInfo::CreateCompileUnit() {
   // file was specified with an absolute path.
   if (CSKind)
     CSInfo.emplace(*CSKind, Checksum);
-  llvm::DIFile *CUFile = DBuilder.createFile(
-      remapDIPath(MainFileName), remapDIPath(getCurrentDirname()), CSInfo,
-      getSource(SM, SM.getMainFileID()));
+  llvm::DIFile *CUFile =
+      createFile(MainFileName, CSInfo, getSource(SM, SM.getMainFileID()));
----------------
noxwell wrote:

`CGDebugInfo::createFile` takes care of remapping, see `std::string RemappedFile = remapDIPath(FileName)`.

https://github.com/llvm/llvm-project/pull/83175


More information about the cfe-commits mailing list