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

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 06:10:12 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()));
----------------
yxsamliu wrote:

Since this now uses `llvm::MD5Hash` directly, please include `llvm/Support/MD5.h` here instead of relying on a transitive include.

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


More information about the cfe-commits mailing list