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
24 KiB
24 KiB