llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-codegen

Author: Aleksei Vetrov (noxwell)

<details>
<summary>Changes</summary>

Use `CGDebugInfo::createFile` wrapper that handles file remapping and corner 
cases instead of directly using `DBuilder.createFile` in 
`CGDebugInfo::CreateCompileUnit`.

Fixes #<!-- -->83174

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


1 Files Affected:

- (modified) clang/lib/CodeGen/CGDebugInfo.cpp (+2-3) 


``````````diff
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp 
b/clang/lib/CodeGen/CGDebugInfo.cpp
index c2c01439f2dc99..2a24cc1a9dc020 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -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()));
 
   StringRef Sysroot, SDK;
   if (CGM.getCodeGenOpts().getDebuggerTuning() == llvm::DebuggerKind::LLDB) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/83175
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to