fix(solc): add missing ir option (#2055)

This commit is contained in:
Matthias Seitz 2023-01-17 01:35:47 +01:00 committed by GitHub
parent 10b18e0d58
commit 5330a688ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -503,6 +503,7 @@ impl ExtraOutputValues {
pub struct ExtraOutputFiles {
pub abi: bool,
pub metadata: bool,
pub ir: bool,
pub ir_optimized: bool,
pub ewasm: bool,
pub assembly: bool,
@ -530,6 +531,7 @@ impl ExtraOutputFiles {
Self {
abi: true,
metadata: true,
ir: true,
ir_optimized: true,
ewasm: true,
assembly: true,
@ -552,6 +554,9 @@ impl ExtraOutputFiles {
ContractOutputSelection::Metadata => {
config.metadata = true;
}
ContractOutputSelection::Ir => {
config.ir = true;
}
ContractOutputSelection::IrOptimized => {
config.ir_optimized = true;
}
@ -606,7 +611,7 @@ impl ExtraOutputFiles {
}
}
if self.ewasm {
if self.ir {
if let Some(ref ir) = contract.ir {
let file = file.with_extension("ir");
fs::write(&file, ir).map_err(|err| SolcError::io(err, file))?