Move condcodes.rs to a new crate, cranelift-codegen-shared

This move allows the `IntCC`/`FloatCC` enums to be used in both meta (for predicate matching) and in codegen. To avoid breaking any code dependent on the previous location of condcodes.rs (`cranelift-codegen/src/condcodes.rs`), the module is re-exported under `cranelift_codegen::ir`.
This commit is contained in:
Andrew Brown
2019-09-23 11:04:50 -07:00
parent a3db30d97e
commit c648fa3d06
9 changed files with 264 additions and 3 deletions

View File

@@ -0,0 +1,26 @@
//! This library contains code that is common to both the `cranelift-codegen` and
//! `cranelift-codegen-meta` libraries.
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![warn(unused_import_braces)]
#![cfg_attr(feature = "std", deny(unstable_features))]
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
#![cfg_attr(
feature = "cargo-clippy",
warn(
clippy::float_arithmetic,
clippy::mut_mut,
clippy::nonminimal_bool,
clippy::option_map_unwrap_or,
clippy::option_map_unwrap_or_else,
clippy::print_stdout,
clippy::unicode_not_nfc,
clippy::use_self
)
)]
pub mod condcodes;
/// Version number of this crate.
pub const VERSION: &str = env!("CARGO_PKG_VERSION");