Replace FunctionBuilder's Drop impl with a finalize function. (#193)

* Replace FunctionBuilder's Drop impl with a finalize function.

This has the advantage of not triggering assertion failures in the event
of abandoning a partially-built function. It has the disadvantage of
requiring users to call finalize() explicitly.
This commit is contained in:
Dan Gohman
2017-11-17 16:03:40 -08:00
committed by GitHub
parent aa6f5c0db3
commit d51a4c1065
3 changed files with 85 additions and 57 deletions

View File

@@ -128,6 +128,8 @@
//! }
//! builder.ins().jump(block1, &[]);
//! builder.seal_block(block1);
//!
//! builder.finalize();
//! }
//!
//! let flags = settings::Flags::new(&settings::builder());