codegen_llvm: improve allocations
This commit is contained in:
parent
61f47737b5
commit
cd41765851
4 changed files with 26 additions and 14 deletions
|
@ -52,8 +52,9 @@ fn require_inited() {
|
|||
}
|
||||
|
||||
unsafe fn configure_llvm(sess: &Session) {
|
||||
let mut llvm_c_strs = Vec::new();
|
||||
let mut llvm_args = Vec::new();
|
||||
let n_args = sess.opts.cg.llvm_args.len();
|
||||
let mut llvm_c_strs = Vec::with_capacity(n_args + 1);
|
||||
let mut llvm_args = Vec::with_capacity(n_args + 1);
|
||||
|
||||
{
|
||||
let mut add = |arg: &str| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue