Skip to content

Commit d4a5553

Browse files
Christian Kurzfredrikekre
authored andcommitted
Cleaned up default descriptions in reflection.jl (#23543)
* Cleaned up default descriptions in reflection.jl Redundant default descriptions were removed. In addtion, square brackets to denote optional arguments were replaced by default syntax: code_native([io], f, types, [syntax]) -> code_native(io=STDOUT, f, types, syntax=att) * Use `[io=STDOUT,]` to show default argument
1 parent bad1329 commit d4a5553

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

base/reflection.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -809,10 +809,10 @@ function _dump_function_linfo(linfo::Core.MethodInstance, world::UInt, native::B
809809
end
810810

811811
"""
812-
code_llvm([io], f, types)
812+
code_llvm([io=STDOUT,], f, types)
813813
814814
Prints the LLVM bitcodes generated for running the method matching the given generic
815-
function and type signature to `io` which defaults to `STDOUT`.
815+
function and type signature to `io`.
816816
817817
All metadata and dbg.* calls are removed from the printed bitcode. Use code_llvm_raw for the full IR.
818818
"""
@@ -822,11 +822,11 @@ code_llvm(@nospecialize(f), @nospecialize(types=Tuple)) = code_llvm(STDOUT, f, t
822822
code_llvm_raw(@nospecialize(f), @nospecialize(types=Tuple)) = code_llvm(STDOUT, f, types, false)
823823

824824
"""
825-
code_native([io], f, types, [syntax])
825+
code_native([io=STDOUT,], f, types, syntax=:att)
826826
827827
Prints the native assembly instructions generated for running the method matching the given
828-
generic function and type signature to `io` which defaults to `STDOUT`.
829-
Switch assembly syntax using `syntax` symbol parameter set to `:att` for AT&T syntax or `:intel` for Intel syntax. Output is AT&T syntax by default.
828+
generic function and type signature to `io`.
829+
Switch assembly syntax using `syntax` symbol parameter set to `:att` for AT&T syntax or `:intel` for Intel syntax.
830830
"""
831831
code_native(io::IO, @nospecialize(f), @nospecialize(types=Tuple), syntax::Symbol=:att) =
832832
print(io, _dump_function(f, types, true, false, false, false, syntax))

0 commit comments

Comments
 (0)