diff options
| author | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-05-06 18:57:04 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-05-17 00:04:09 +0300 |
| commit | 0fcaf11455b2864ba642216d4860c213b09a8db1 (patch) | |
| tree | 8869e94e354677917bc58240cdb301996cad9da9 /compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs | |
| parent | 402e9efc56fb21464a0cddf9aeab57c7512cf71d (diff) | |
| download | rust-0fcaf11455b2864ba642216d4860c213b09a8db1.tar.gz rust-0fcaf11455b2864ba642216d4860c213b09a8db1.zip | |
rustc_codegen_ssa: append blocks to functions w/o creating a builder.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs index afc2bdbfd52..019bf4a09a7 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs @@ -223,7 +223,8 @@ fn declare_unused_fn(cx: &CodegenCx<'ll, 'tcx>, def_id: &DefId) -> Instance<'tcx fn codegen_unused_fn_and_counter(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) { let llfn = cx.get_fn(instance); - let mut bx = Builder::new_block(cx, llfn, "unused_function"); + let llbb = Builder::append_block(cx, llfn, "unused_function"); + let mut bx = Builder::build(cx, llbb); let fn_name = bx.get_pgo_func_name_var(instance); let hash = bx.const_u64(0); let num_counters = bx.const_u32(1); |
