Skip to content

Commit 4c03c9d

Browse files
jsjodinronlieb
authored andcommitted
[clang][OpenMP] Propoagate debug location to OMPIRBuilder reduction codegen (llvm#100358)
This patch propagates the debug location from Clang to the OpenMPIRBuilder. Fixes llvm#97458
1 parent 3450a62 commit 4c03c9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,8 @@ void CGOpenMPRuntimeGPU::emitReduction(
19111911
CGF.AllocaInsertPt->getIterator());
19121912
InsertPointTy CodeGenIP(CGF.Builder.GetInsertBlock(),
19131913
CGF.Builder.GetInsertPoint());
1914-
llvm::OpenMPIRBuilder::LocationDescription OmpLoc(CodeGenIP);
1914+
llvm::OpenMPIRBuilder::LocationDescription OmpLoc(
1915+
CodeGenIP, CGF.SourceLocToDebugLoc(Loc));
19151916
llvm::SmallVector<llvm::OpenMPIRBuilder::ReductionInfo> ReductionInfos;
19161917

19171918
CodeGenFunction::OMPPrivateScope Scope(CGF);

0 commit comments

Comments
 (0)