mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-25 16:27:57 +00:00
experimental: support for debug info (#118)
Signed-off-by: wpt967 <matt.aw@parity.io> Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -19,7 +19,7 @@ pub struct Input {
|
||||
/// The optimizer settings.
|
||||
pub optimizer_settings: revive_llvm_context::OptimizerSettings,
|
||||
/// The debug output config.
|
||||
pub debug_config: Option<revive_llvm_context::DebugConfig>,
|
||||
pub debug_config: revive_llvm_context::DebugConfig,
|
||||
}
|
||||
|
||||
impl Input {
|
||||
@@ -29,7 +29,7 @@ impl Input {
|
||||
project: Project,
|
||||
include_metadata_hash: bool,
|
||||
optimizer_settings: revive_llvm_context::OptimizerSettings,
|
||||
debug_config: Option<revive_llvm_context::DebugConfig>,
|
||||
debug_config: revive_llvm_context::DebugConfig,
|
||||
) -> Self {
|
||||
Self {
|
||||
contract,
|
||||
|
||||
@@ -85,17 +85,16 @@ pub fn call(input: Input) -> anyhow::Result<Output> {
|
||||
})?;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
if let Some(dbg_config) = &input.debug_config {
|
||||
dbg_config
|
||||
.dump_stage_output(&input.contract.path, Some("stage"), &input_json)
|
||||
.map_err(|error| {
|
||||
anyhow::anyhow!(
|
||||
"{:?} failed to log the recursive process output: {:?}",
|
||||
executable,
|
||||
error,
|
||||
)
|
||||
})?;
|
||||
}
|
||||
input
|
||||
.debug_config
|
||||
.dump_stage_output(&input.contract.path, Some("stage"), &input_json)
|
||||
.map_err(|error| {
|
||||
anyhow::anyhow!(
|
||||
"{:?} failed to log the recursive process output: {:?}",
|
||||
executable,
|
||||
error,
|
||||
)
|
||||
})?;
|
||||
|
||||
process
|
||||
.stdin
|
||||
|
||||
Reference in New Issue
Block a user