================ @@ -2648,6 +2649,12 @@ class FunctionDecl : public DeclaratorDecl, /// Determine if this function provides an inline implementation of a builtin. bool isInlineBuiltinDeclaration() const; + /// Return true if this function's body contains only a direct call back to + /// the same symbol via an asm label or a __builtin_* alias. Such + /// available_externally bodies are not valid stand-ins for the real + /// implementation (PR9614) and should be dropped before codegen. + bool isTriviallyRecursive(MangleContext &MC) const; ---------------- erichkeane wrote:
We probably shouldn't be doing mangle-contexts inside of our declarations here, thats a bit of a layering violation. Perhaps this is a valuable function to put in the `MangleContext` itself? https://github.com/llvm/llvm-project/pull/198363 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
