diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-17 18:54:02 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-26 22:17:07 +0800 |
commit | 30012db396793efad5dba9a2bbb64d34994709ce (patch) | |
tree | 6270037929123b5a95038a6bd7f3b6a305d516ac /libsolidity/interface/CompilerStack.h | |
parent | 6848199b66d9cadae901f71dcf944fe9aa927eeb (diff) | |
download | dexon-solidity-30012db396793efad5dba9a2bbb64d34994709ce.tar.gz dexon-solidity-30012db396793efad5dba9a2bbb64d34994709ce.tar.zst dexon-solidity-30012db396793efad5dba9a2bbb64d34994709ce.zip |
Add CompilerStack::setOptimiserSettings
Diffstat (limited to 'libsolidity/interface/CompilerStack.h')
-rw-r--r-- | libsolidity/interface/CompilerStack.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index 39875c32..356389db 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -103,6 +103,14 @@ public: m_libraries = _libraries; } + /// Changes the optimiser settings. + /// Will not take effect before running compile. + void setOptimiserSettings(bool _optimize, unsigned _runs = 200) + { + m_optimize = _optimize; + m_optimizeRuns = _runs; + } + /// Resets the compiler to a state where the sources are not parsed or even removed. /// Sets the state to SourcesSet if @a _keepSources is true, otherwise to Empty. /// All settings, with the exception of remappings, are reset. @@ -126,10 +134,7 @@ public: /// Compiles the source units that were previously added and parsed. /// @returns false on error. - bool compile( - bool _optimize = false, - unsigned _runs = 200 - ); + bool compile(); /// @returns the assembled object for a contract. eth::LinkerObject const& object(std::string const& _contractName = "") const; |