[llvm-branch-commits] [clang] release/19.x: [clang][OpenMP] Propoagate debug location to OMPIRBuilder reduction codegen (#100358) (PR #100381)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jul 24 07:03:32 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-codegen

Author: None (llvmbot)

<details>
<summary>Changes</summary>

Backport 5b15d9c441810121c23f9f421bbb007fd4c448e8

Requested by: @<!-- -->jhuber6

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


1 Files Affected:

- (modified) clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp (+2-1) 


``````````diff
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
index f5bd4a141cc2d..8965a14d88a6f 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
@@ -1695,7 +1695,8 @@ void CGOpenMPRuntimeGPU::emitReduction(
                          CGF.AllocaInsertPt->getIterator());
   InsertPointTy CodeGenIP(CGF.Builder.GetInsertBlock(),
                           CGF.Builder.GetInsertPoint());
-  llvm::OpenMPIRBuilder::LocationDescription OmpLoc(CodeGenIP);
+  llvm::OpenMPIRBuilder::LocationDescription OmpLoc(
+      CodeGenIP, CGF.SourceLocToDebugLoc(Loc));
   llvm::SmallVector<llvm::OpenMPIRBuilder::ReductionInfo> ReductionInfos;
 
   CodeGenFunction::OMPPrivateScope Scope(CGF);

``````````

</details>


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


More information about the llvm-branch-commits mailing list