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-27 13:54:42 +0530
commitddeab07ca63235f8d952e1171b56fdb0f2d761c9 (patch)
tree7f716c3bcef2f5189173d5759490e5b895f6f488 /clang/lib/CodeGen/CodeGenAction.cpp
parentfe01c084249969518bcd69aa2fedffc9f017f43a (diff)
downloadllvm-ddeab07ca63235f8d952e1171b56fdb0f2d761c9.zip
llvm-ddeab07ca63235f8d952e1171b56fdb0f2d761c9.tar.gz
llvm-ddeab07ca63235f8d952e1171b56fdb0f2d761c9.tar.bz2
[clang-repl][CUDA] Re-land: 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
}