https://github.com/ivanradanov created 
https://github.com/llvm/llvm-project/pull/73856

None

>From 791afd6349aef7eee8b9f6c132a30f72c36a9efb Mon Sep 17 00:00:00 2001
From: Ivan Radanov Ivanov <ivan...@llnl.gov>
Date: Wed, 29 Nov 2023 13:22:46 -0800
Subject: [PATCH] [clang][OpenMP] Fix missing DI for __kmpc_global_thread_num

---
 clang/lib/CodeGen/CGOpenMPRuntime.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp 
b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index aae1a0ea250eea2..b4a7eafd2eec70b 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -1441,6 +1441,7 @@ llvm::Value *CGOpenMPRuntime::getThreadID(CodeGenFunction 
&CGF,
     setLocThreadIdInsertPt(CGF);
   CGBuilderTy::InsertPointGuard IPG(CGF.Builder);
   CGF.Builder.SetInsertPoint(Elem.second.ServiceInsertPt);
+  auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc);
   llvm::CallInst *Call = CGF.Builder.CreateCall(
       OMPBuilder.getOrCreateRuntimeFunction(CGM.getModule(),
                                             OMPRTL___kmpc_global_thread_num),

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to