[clang] [clang][cuda] Use the source filename for module ID (PR #209239)

Teresa Johnson via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 07:04:07 PDT 2026


================
@@ -1045,8 +1045,7 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() {
     llvm::raw_svector_ostream OS(ModuleID);
     OS << ModuleIDPrefix
        << llvm::format("%" PRIx64,
-                       llvm::GlobalValue::getGUIDAssumingExternalLinkage(
-                           FatbinWrapper->getName()));
+                       llvm::MD5Hash(TheModule.getSourceFileName()));
----------------
teresajohnson wrote:

While this predates the guid changes, this will not be unique if the module is not built with enough distinguishing path. Do you want to add a comment?

https://github.com/llvm/llvm-project/pull/209239


More information about the cfe-commits mailing list