diff options
author | Nick Fitzgerald <fitzgen@gmail.com> | 2017-07-20 13:08:08 -0700 |
---|---|---|
committer | Nick Fitzgerald <fitzgen@gmail.com> | 2017-07-20 15:34:34 -0700 |
commit | 003cfe6e33a4a7272d5dbd185fc45ea1d848e1cb (patch) | |
tree | 23542b654bf80a5b2f4e896e22cc83e2a6e0762d /src | |
parent | dc73bc6cd8c74109bd04b8cc846b5262c7854f0a (diff) |
Move fix-point analyses to their own module
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/analysis/cant_derive_debug.rs (renamed from src/ir/cant_derive_debug.rs) | 2 | ||||
-rw-r--r-- | src/ir/analysis/mod.rs (renamed from src/ir/analysis.rs) | 6 | ||||
-rw-r--r-- | src/ir/analysis/template_params.rs (renamed from src/ir/named.rs) | 12 | ||||
-rw-r--r-- | src/ir/context.rs | 4 | ||||
-rw-r--r-- | src/ir/mod.rs | 2 |
5 files changed, 14 insertions, 12 deletions
diff --git a/src/ir/cant_derive_debug.rs b/src/ir/analysis/cant_derive_debug.rs index f6a7fab7..5892bd09 100644 --- a/src/ir/cant_derive_debug.rs +++ b/src/ir/analysis/cant_derive_debug.rs @@ -1,5 +1,5 @@ //! Determining which types for which we can emit `#[derive(Debug)]`. -use super::analysis::MonotoneFramework; +use super::MonotoneFramework; use ir::context::{BindgenContext, ItemId}; use ir::item::ItemSet; use std::collections::HashSet; diff --git a/src/ir/analysis.rs b/src/ir/analysis/mod.rs index e12f890f..a757e3b6 100644 --- a/src/ir/analysis.rs +++ b/src/ir/analysis/mod.rs @@ -37,6 +37,12 @@ //! //! [spa]: https://cs.au.dk/~amoeller/spa/spa.pdf +// Re-export individual analyses. +mod template_params; +pub use self::template_params::UsedTemplateParameters; +mod cant_derive_debug; +pub use self::cant_derive_debug::CantDeriveDebugAnalysis; + use std::fmt; /// An analysis in the monotone framework. diff --git a/src/ir/named.rs b/src/ir/analysis/template_params.rs index 6176faf1..ab4eca3c 100644 --- a/src/ir/named.rs +++ b/src/ir/analysis/template_params.rs @@ -88,12 +88,12 @@ //! //! See `src/ir/analysis.rs` for more. -use super::analysis::MonotoneFramework; -use super::context::{BindgenContext, ItemId}; -use super::item::{Item, ItemSet}; -use super::template::{TemplateInstantiation, TemplateParameters}; -use super::traversal::{EdgeKind, Trace}; -use super::ty::TypeKind; +use super::MonotoneFramework; +use ir::context::{BindgenContext, ItemId}; +use ir::item::{Item, ItemSet}; +use ir::template::{TemplateInstantiation, TemplateParameters}; +use ir::traversal::{EdgeKind, Trace}; +use ir::ty::TypeKind; use std::collections::{HashMap, HashSet}; /// An analysis that finds for each IR item its set of template parameters that diff --git a/src/ir/context.rs b/src/ir/context.rs index a0c76186..d0114144 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -5,12 +5,10 @@ use super::int::IntKind; use super::item::{IsOpaque, Item, ItemAncestors, ItemCanonicalPath, ItemSet}; use super::item_kind::ItemKind; use super::module::{Module, ModuleKind}; -use super::named::UsedTemplateParameters; -use super::analysis::analyze; +use super::analysis::{analyze, UsedTemplateParameters, CantDeriveDebugAnalysis}; use super::template::{TemplateInstantiation, TemplateParameters}; use super::traversal::{self, Edge, ItemTraversal}; use super::ty::{FloatKind, Type, TypeKind}; -use super::cant_derive_debug::CantDeriveDebugAnalysis; use BindgenOptions; use cexpr; use callbacks::ParseCallbacks; diff --git a/src/ir/mod.rs b/src/ir/mod.rs index f8b9edfa..93894f94 100644 --- a/src/ir/mod.rs +++ b/src/ir/mod.rs @@ -17,10 +17,8 @@ pub mod item; pub mod item_kind; pub mod layout; pub mod module; -pub mod named; pub mod template; pub mod traversal; pub mod ty; pub mod var; pub mod objc; -pub mod cant_derive_debug; |