- adhoc (backend : Name) : ExternEntry
- inline (backend : Name) (pattern : String) : ExternEntry
- standard (backend : Name) (fn : String) : ExternEntry
- opaque : ExternEntry
Call to a Lean function without exported IR.
Instances For
@[extern]encoding:.entries = [adhoc `all]@[extern "level_hash"]encoding:.entries = [standard `all "levelHash"]@[extern cpp "lean::string_size" llvm "lean_str_size"]encoding:.entries = [standard `cpp "lean::string_size", standard `llvm "leanStrSize"]@[extern cpp inline "#1 + #2"]encoding:.entries = [inline `cpp "#1 + #2"]@[extern cpp "foo" llvm adhoc]encoding:.entries = [standard `cpp "foo", adhoc `llvm]
- entries : List ExternEntry
Instances For
Equations
Instances For
@[extern lean_add_extern]
Equations
Instances For
Equations
Instances For
Equations
Instances For
We say a Lean function marked as [extern "<c_fn_name>"] is for all backends, and it is implemented using extern "C".
Thus, there is no name mangling.