Skip to content

Commit 43cec9d

Browse files
jsjodinllvmbot
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 (cherry picked from commit 5b15d9c)
1 parent 518cef7 commit 43cec9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,8 @@ void CGOpenMPRuntimeGPU::emitReduction(
16951695
CGF.AllocaInsertPt->getIterator());
16961696
InsertPointTy CodeGenIP(CGF.Builder.GetInsertBlock(),
16971697
CGF.Builder.GetInsertPoint());
1698-
llvm::OpenMPIRBuilder::LocationDescription OmpLoc(CodeGenIP);
1698+
llvm::OpenMPIRBuilder::LocationDescription OmpLoc(
1699+
CodeGenIP, CGF.SourceLocToDebugLoc(Loc));
16991700
llvm::SmallVector<llvm::OpenMPIRBuilder::ReductionInfo> ReductionInfos;
17001701

17011702
CodeGenFunction::OMPPrivateScope Scope(CGF);

0 commit comments

Comments
 (0)