pub prints: Vec<PrintRequest>,
pub cg: CodegenOptions,
pub color: ColorConfig,
+ pub show_span: Option<String>,
pub externs: HashMap<String, Vec<String>>,
pub crate_name: Option<String>,
/// An optional name to use as the crate for std during std injection,
prints: Vec::new(),
cg: basic_codegen_options(),
color: Auto,
+ show_span: None,
externs: HashMap::new(),
crate_name: None,
alt_std_name: None,
BORROWCK_STATS,
NO_LANDING_PADS,
DEBUG_LLVM,
- SHOW_SPAN,
COUNT_TYPE_SIZES,
META_STATS,
GC,
("no-landing-pads", "omit landing pads for unwinding",
NO_LANDING_PADS),
("debug-llvm", "enable debug output from LLVM", DEBUG_LLVM),
- ("show-span", "show spans for compiler debugging", SHOW_SPAN),
("count-type-sizes", "count the sizes of aggregate types",
COUNT_TYPE_SIZES),
("meta-stats", "gather metadata statistics", META_STATS),
"[asm|llvm-bc|llvm-ir|obj|link|dep-info]"),
opt::multi("", "print", "Comma separated list of compiler information to \
print on stdout",
- "[crate-name|output-file-names|sysroot]"),
+ "[crate-name|file-names|sysroot]"),
opt::flag("g", "", "Equivalent to -C debuginfo=2"),
opt::flag("O", "", "Equivalent to -C opt-level=2"),
opt::opt("o", "", "Write output to <filename>", "FILENAME"),
`flowgraph=<nodeid>` (graphviz formatted flowgraph for node), or
`everybody_loops` (all function bodies replaced with `loop {}`).",
"TYPE"),
+ opt::opt_u("", "show-span", "Show spans for compiler debugging", "expr|pat|ty"),
opt::flagopt("", "dep-info",
"Output dependency info to <filename> after compiling, \
in a format suitable for use by Makefiles", "FILENAME"),
None => early_error("--extern value must be of the format `foo=bar`"),
};
- match externs.entry(name.to_string()) {
- Vacant(entry) => { entry.set(vec![location.to_string()]); },
+ match externs.entry(&name.to_string()) {
+ Vacant(entry) => { entry.insert(vec![location.to_string()]); },
Occupied(mut entry) => { entry.get_mut().push(location.to_string()); },
}
}
prints: prints,
cg: cg,
color: color,
+ show_span: None,
externs: externs,
crate_name: crate_name,
alt_std_name: None,