mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-25 03:37:57 +00:00
llvm-context: alloca at the function entry if possible (#283)
Closes #48 Change the code size test to no longer emit debug info as to get a more accurate picture. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
@@ -92,7 +92,7 @@ pub fn build_solidity_with_options(
|
||||
SolcStandardJsonInputSettingsSelection::new_required(),
|
||||
SolcStandardJsonInputSettingsOptimizer::new(
|
||||
solc_optimizer_enabled,
|
||||
None,
|
||||
optimizer_settings.middle_end_as_string().chars().last(),
|
||||
&solc_version.default,
|
||||
false,
|
||||
),
|
||||
@@ -102,16 +102,21 @@ pub fn build_solidity_with_options(
|
||||
|
||||
let mut output = solc.standard_json(input, None, vec![], None)?;
|
||||
|
||||
let debug_config = revive_llvm_context::DebugConfig::new(
|
||||
None,
|
||||
optimizer_settings.middle_end_as_string() != "z",
|
||||
);
|
||||
|
||||
let project = Project::try_from_standard_json_output(
|
||||
&output,
|
||||
sources,
|
||||
libraries,
|
||||
&solc_version,
|
||||
&DEBUG_CONFIG,
|
||||
&debug_config,
|
||||
)?;
|
||||
|
||||
let build: crate::Build =
|
||||
project.compile(optimizer_settings, false, DEBUG_CONFIG, Default::default())?;
|
||||
project.compile(optimizer_settings, false, debug_config, Default::default())?;
|
||||
build.write_to_standard_json(&mut output, &solc_version)?;
|
||||
|
||||
Ok(output)
|
||||
|
||||
Reference in New Issue
Block a user