diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-03-24 00:06:29 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-03-24 00:06:29 +0100 |
commit | 84da57f4234b96a897476696152f86ca7ea101a7 (patch) | |
tree | 6d8fce9d7d310c2b899d5453150e9603222a182b | |
parent | aa9bd918772039e45a7e2ff5f90a36488776af4c (diff) |
gen: Add size checking for substituted variables
-rw-r--r-- | src/gen.rs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -469,6 +469,14 @@ fn gen_globals(mut ctx: &mut GenCtx, } if let Some(substituted) = ctx.current_module().translations.get(&g.name()) { + match (substituted.layout(), g.layout()) { + (Some(l), Some(lg)) if l.size != lg.size => {}, + (None, None) => {}, + _ => { + // XXX real logger + println!("warning: substituted type for {} does not match its size", g.name()); + } + } g = substituted.clone(); } |