Unverified Commit f3ac55fa authored by Florian Hahn's avatar Florian Hahn Committed by GitHub
Browse files

[LTO] Reset DiscardValueNames in optimize(). (#78705)

libLTO parses options late, so at the moment the option is ignored. To
fix that, re-set it in optimize(), as at this point the options have been
parsed. When LTOCodeGenerator's constructor executes, the options
haven't been parsed by the linker to libLTO yet.

Note that we keep the value name of `%add = add..` because when the
module is imported, DiscardValueNames is still set to false (the default
when building with assertions).

I tried to improve this in libLTO, but I am not sure if there's a
suitable callback when all options have been set.

PR: https://github.com/llvm/llvm-project/pull/78705
parent 6fab3f2a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment