Skip to content

Commit 630289f

Browse files
authored
[HIP] Do not include the CUID module hash with the new driver (#84332)
Summary: The new driver does not need this hash and it can lead to redefined symbol errors when the CUID hash isn't set.
1 parent d1fc59c commit 630289f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ void CodeGenModule::Release() {
916916
llvm::ConstantArray::get(ATy, UsedArray), "__clang_gpu_used_external");
917917
addCompilerUsedGlobal(GV);
918918
}
919-
if (LangOpts.HIP) {
919+
if (LangOpts.HIP && !getLangOpts().OffloadingNewDriver) {
920920
// Emit a unique ID so that host and device binaries from the same
921921
// compilation unit can be associated.
922922
auto *GV = new llvm::GlobalVariable(

0 commit comments

Comments
 (0)