diff options
author | Anubhab Ghosh <anubhabghosh.me@gmail.com> | 2023-03-06 16:50:02 +0530 |
---|---|---|
committer | Anubhab Ghosh <anubhabghosh.me@gmail.com> | 2023-05-27 13:54:42 +0530 |
commit | ddeab07ca63235f8d952e1171b56fdb0f2d761c9 (patch) | |
tree | 7f716c3bcef2f5189173d5759490e5b895f6f488 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | fe01c084249969518bcd69aa2fedffc9f017f43a (diff) | |
download | llvm-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.cpp | 2 |
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 } |