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:
parent
3a5d45f68c
commit
1ec905766d
4 changed files with 17 additions and 16 deletions
|
@ -1044,7 +1044,7 @@ pub unsafe fn with_llvm_pmb(
|
|||
// thresholds copied from clang.
|
||||
match (opt_level, opt_size, inline_threshold) {
|
||||
(.., Some(t)) => {
|
||||
llvm::LLVMPassManagerBuilderUseInlinerWithThreshold(builder, t as u32);
|
||||
llvm::LLVMPassManagerBuilderUseInlinerWithThreshold(builder, t);
|
||||
}
|
||||
(llvm::CodeGenOptLevel::Aggressive, ..) => {
|
||||
llvm::LLVMPassManagerBuilderUseInlinerWithThreshold(builder, 275);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue