================
@@ -5752,6 +5752,13 @@ llvm::Constant *CodeGenModule::GetOrCreateLLVMFunction(
           }
         }
       }
+      if (LangOpts.IncrementalExtensions && LangOpts.CUDAIsDevice) {
+        const auto *FD = cast<FunctionDecl>(D);
+        if (const FunctionDecl *Def = FD->getDefinition();
+            Def && Def->hasBody() &&
+            (Def->isInlined() || Def->getFormalLinkage() == Linkage::Internal))
----------------
yxsamliu wrote:

This uses source-level `inline` and formal linkage, while the existing 
incremental logic uses the actual LLVM linkage: internal, linkonce, or weak. 
These can differ for templates and weak functions. Could this reuse the 
existing linkage rule and explain why the current `DeferredDecls` path does not 
handle this case?

https://github.com/llvm/llvm-project/pull/218784
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to