-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add clang 16/17 CUDA CodeGen fix patch
- Loading branch information
1 parent
cb12820
commit aa66f9e
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b//clang/lib/CodeGen/CodeGenModule.cpp | ||
index f09d1129b128..82289cba3c12 100644 | ||
--- a/clang/lib/CodeGen/CodeGenModule.cpp | ||
+++ b/clang/lib/CodeGen/CodeGenModule.cpp | ||
@@ -786,7 +786,7 @@ void CodeGenModule::Release() { | ||
AddGlobalCtor(ObjCInitFunction); | ||
if (Context.getLangOpts().CUDA && CUDARuntime) { | ||
if (llvm::Function *CudaCtorFunction = CUDARuntime->finalizeModule()) | ||
- AddGlobalCtor(CudaCtorFunction); | ||
+ AddGlobalCtor(CudaCtorFunction, 0); | ||
} | ||
if (OpenMPRuntime) { | ||
if (llvm::Function *OpenMPRequiresDirectiveRegFun = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b//clang/lib/CodeGen/CodeGenModule.cpp | ||
index f09d1129b128..82289cba3c12 100644 | ||
--- a/clang/lib/CodeGen/CodeGenModule.cpp | ||
+++ b/clang/lib/CodeGen/CodeGenModule.cpp | ||
@@ -786,7 +786,7 @@ void CodeGenModule::Release() { | ||
AddGlobalCtor(ObjCInitFunction); | ||
if (Context.getLangOpts().CUDA && CUDARuntime) { | ||
if (llvm::Function *CudaCtorFunction = CUDARuntime->finalizeModule()) | ||
- AddGlobalCtor(CudaCtorFunction); | ||
+ AddGlobalCtor(CudaCtorFunction, 0); | ||
} | ||
if (OpenMPRuntime) { | ||
if (llvm::Function *OpenMPRequiresDirectiveRegFun = |