aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorAnubhab Ghosh <anubhabghosh.me@gmail.com>2023-03-06 16:50:02 +0530
committerAnubhab Ghosh <anubhabghosh.me@gmail.com>2023-05-20 14:00:48 +0530
commit80e7eed6a610ab3c7289e6f9b7ec006bc7d7ae31 (patch)
tree01efc2c4d2fa8819d158fca07890b2134f51010d /clang/lib/CodeGen/CodeGenAction.cpp
parent14f245d01a1ee489a13e843e9c77cecf5c7183a9 (diff)
downloadllvm-80e7eed6a610ab3c7289e6f9b7ec006bc7d7ae31.zip
llvm-80e7eed6a610ab3c7289e6f9b7ec006bc7d7ae31.tar.gz
llvm-80e7eed6a610ab3c7289e6f9b7ec006bc7d7ae31.tar.bz2
[clang-repl][CUDA] Initial interactive CUDA support for clang-repl
CUDA support can be enabled in clang-repl with --cuda flag. Device code linking is not yet supported. inline must be used with all __device__ functions. Differential Revision: https://reviews.llvm.org/D146389
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 29adf88..784ff77 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -264,6 +264,7 @@ namespace clang {
// Links each entry in LinkModules into our module. Returns true on error.
bool LinkInModules() {
for (auto &LM : LinkModules) {
+ assert(LM.Module && "LinkModule does not actually have a module");
if (LM.PropagateAttrs)
for (Function &F : *LM.Module) {
// Skip intrinsics. Keep consistent with how intrinsics are created
@@ -293,6 +294,7 @@ namespace clang {
if (Err)
return true;
}
+ LinkModules.clear();
return false; // success
}