Skip to content

Commit

Permalink
Set the default for debuginfo to :none
Browse files Browse the repository at this point in the history
  • Loading branch information
Seelengrab committed Jan 10, 2023
1 parent 9491bd4 commit c09b2a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ Standard library changes

#### InteractiveUtils

* `code_native` and `@code_native` now default to intel syntax instead of AT&T.
* `code_native` and `@code_native` now default to intel syntax instead of AT&T, as well as no longer
displaying the source line information by default. To show it again, pass `debuginfo=:soure` to the macro.

Deprecated or removed
---------------------
Expand Down
6 changes: 3 additions & 3 deletions stdlib/InteractiveUtils/src/codeview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function _dump_function(@nospecialize(f), @nospecialize(t), native::Bool, wrappe
end
# get the code for it
if debuginfo === :default
debuginfo = :source
debuginfo = :none
elseif debuginfo !== :source && debuginfo !== :none
throw(ArgumentError("'debuginfo' must be either :source or :none"))
end
Expand Down Expand Up @@ -264,7 +264,7 @@ function and type signature to `io`.
If the `optimize` keyword is unset, the code will be shown before LLVM optimizations.
All metadata and dbg.* calls are removed from the printed bitcode. For the full IR, set the `raw` keyword to true.
To dump the entire module that encapsulates the function (with declarations), set the `dump_module` keyword to true.
Keyword argument `debuginfo` may be one of source (default) or none, to specify the verbosity of code comments.
Keyword argument `debuginfo` may be one of `:source` or `:none` (default), to specify the verbosity of code comments.
"""
function code_llvm(io::IO, @nospecialize(f), @nospecialize(types), raw::Bool,
dump_module::Bool=false, optimize::Bool=true, debuginfo::Symbol=:default)
Expand All @@ -287,7 +287,7 @@ Prints the native assembly instructions generated for running the method matchin
generic function and type signature to `io`.
* Set assembly syntax by setting `syntax` to `:intel` (default) for intel syntax or `:att` for AT&T syntax.
* Specify verbosity of code comments by setting `debuginfo` to `:source` (default) or `:none`.
* Specify verbosity of code comments by setting `debuginfo` to `:source` or `:none` (default).
* If `binary` is `true`, also print the binary machine code for each instruction precedented by an abbreviated address.
* If `dump_module` is `false`, do not print metadata such as rodata or directives.
Expand Down

0 comments on commit c09b2a1

Please sign in to comment.