From 9eef20ed01362b45f071bcb0e1a9254c6ea358da Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Wed, 27 Sep 2023 07:57:25 +0800 Subject: [PATCH 1/2] [Dcompute] Disable all moduleinfo, do not require pragma --- driver/dcomputecodegenerator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/driver/dcomputecodegenerator.cpp b/driver/dcomputecodegenerator.cpp index 5d7483f210d..bde899ac16d 100644 --- a/driver/dcomputecodegenerator.cpp +++ b/driver/dcomputecodegenerator.cpp @@ -86,6 +86,7 @@ DComputeCodeGenManager::DComputeCodeGenManager(llvm::LLVMContext &c) : ctx(c) { void DComputeCodeGenManager::emit(Module *m) { for (auto &target : targets) { + m->noModuleInfo = true; target->emit(m); IrDsymbol::resetAll(); } From 5372dc0c3fe76dda0036c1743229787f38881aa0 Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Wed, 27 Sep 2023 08:09:26 +0800 Subject: [PATCH 2/2] Update dcomputecodegenerator.cpp --- driver/dcomputecodegenerator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/driver/dcomputecodegenerator.cpp b/driver/dcomputecodegenerator.cpp index bde899ac16d..4e612ee7c45 100644 --- a/driver/dcomputecodegenerator.cpp +++ b/driver/dcomputecodegenerator.cpp @@ -11,6 +11,7 @@ #include "driver/cl_options.h" #include "driver/cl_helpers.h" #include "dmd/errors.h" +#include "dmd/module.h" #include "ir/irdsymbol.h" #include "llvm/Support/CommandLine.h" #include