1
Fork 0

Use FromStr trait for number option parsing

Replace `parse_uint` with generic `parse_number` based on `FromStr`.
Use it for parsing inlining threshold to avoid casting later.
This commit is contained in:
Tomasz Miąsko 2021-02-24 00:00:00 +00:00
parent 3a5d45f68c
commit 1ec905766d
4 changed files with 17 additions and 16 deletions

View file

@ -106,7 +106,7 @@ pub struct ModuleConfig {
pub vectorize_loop: bool,
pub vectorize_slp: bool,
pub merge_functions: bool,
pub inline_threshold: Option<usize>,
pub inline_threshold: Option<u32>,
pub new_llvm_pass_manager: bool,
pub emit_lifetime_markers: bool,
}