================
@@ -5092,7 +5092,10 @@ bool CodeGenModule::shouldEmitFunction(GlobalDecl GD) {
     //
     // TODO: Maybe it is better to give it a warning if we call a non-inline
     // function from other module units which is marked as always-inline.
-    if (!F->isTemplateInstantiation() || !F->hasAttr<AlwaysInlineAttr>()) {
+    // GNU-inline definitions in the global module fragment are also needed
+    // for inlining, but definitions owned by named modules remain restricted.
+    if ((!F->isTemplateInstantiation() || !F->hasAttr<AlwaysInlineAttr>()) &&
----------------
mathew1046 wrote:

I thought `&&` was needed since we return `false` only when neither exception 
applies. Wouldn’t `||` reject each case unless both exceptions apply? Is my 
understanding correct?

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

Reply via email to