@@ -164,7 +164,7 @@ void CommandLineInterface::handleBinary(string const& _contract)
164
164
solAssert (
165
165
m_options.input .mode == InputMode::Compiler ||
166
166
m_options.input .mode == InputMode::CompilerWithASTImport ||
167
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
167
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
168
168
);
169
169
170
170
if (m_options.compiler .outputs .binary )
@@ -194,7 +194,7 @@ void CommandLineInterface::handleOpcode(string const& _contract)
194
194
solAssert (
195
195
m_options.input .mode == InputMode::Compiler ||
196
196
m_options.input .mode == InputMode::CompilerWithASTImport ||
197
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
197
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
198
198
);
199
199
200
200
if (!m_options.output .dir .empty ())
@@ -212,7 +212,7 @@ void CommandLineInterface::handleIR(string const& _contractName)
212
212
solAssert (
213
213
m_options.input .mode == InputMode::Compiler ||
214
214
m_options.input .mode == InputMode::CompilerWithASTImport ||
215
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
215
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
216
216
);
217
217
218
218
if (!m_options.compiler .outputs .ir )
@@ -232,7 +232,7 @@ void CommandLineInterface::handleIROptimized(string const& _contractName)
232
232
solAssert (
233
233
m_options.input .mode == InputMode::Compiler ||
234
234
m_options.input .mode == InputMode::CompilerWithASTImport ||
235
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
235
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
236
236
);
237
237
238
238
if (!m_options.compiler .outputs .irOptimized )
@@ -252,7 +252,7 @@ void CommandLineInterface::handleEwasm(string const& _contractName)
252
252
solAssert (
253
253
m_options.input .mode == InputMode::Compiler ||
254
254
m_options.input .mode == InputMode::CompilerWithASTImport ||
255
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
255
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
256
256
);
257
257
258
258
if (!m_options.compiler .outputs .ewasm )
@@ -279,7 +279,7 @@ void CommandLineInterface::handleBytecode(string const& _contract)
279
279
solAssert (
280
280
m_options.input .mode == InputMode::Compiler ||
281
281
m_options.input .mode == InputMode::CompilerWithASTImport ||
282
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
282
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
283
283
);
284
284
285
285
if (m_options.compiler .outputs .opcodes )
@@ -293,7 +293,7 @@ void CommandLineInterface::handleSignatureHashes(string const& _contract)
293
293
solAssert (
294
294
m_options.input .mode == InputMode::Compiler ||
295
295
m_options.input .mode == InputMode::CompilerWithASTImport ||
296
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
296
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
297
297
);
298
298
299
299
if (!m_options.compiler .outputs .signatureHashes )
@@ -329,7 +329,7 @@ void CommandLineInterface::handleMetadata(string const& _contract)
329
329
solAssert (
330
330
m_options.input .mode == InputMode::Compiler ||
331
331
m_options.input .mode == InputMode::CompilerWithASTImport ||
332
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
332
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
333
333
);
334
334
335
335
if (!m_options.compiler .outputs .metadata )
@@ -347,7 +347,7 @@ void CommandLineInterface::handleABI(string const& _contract)
347
347
solAssert (
348
348
m_options.input .mode == InputMode::Compiler ||
349
349
m_options.input .mode == InputMode::CompilerWithASTImport ||
350
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
350
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
351
351
);
352
352
353
353
if (!m_options.compiler .outputs .abi )
@@ -365,7 +365,7 @@ void CommandLineInterface::handleStorageLayout(string const& _contract)
365
365
solAssert (
366
366
m_options.input .mode == InputMode::Compiler ||
367
367
m_options.input .mode == InputMode::CompilerWithASTImport ||
368
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
368
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
369
369
);
370
370
371
371
if (!m_options.compiler .outputs .storageLayout )
@@ -383,7 +383,7 @@ void CommandLineInterface::handleNatspec(bool _natspecDev, string const& _contra
383
383
solAssert (
384
384
m_options.input .mode == InputMode::Compiler ||
385
385
m_options.input .mode == InputMode::CompilerWithASTImport ||
386
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
386
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
387
387
);
388
388
389
389
bool enabled = false ;
@@ -430,7 +430,7 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
430
430
solAssert (
431
431
m_options.input .mode == InputMode::Compiler ||
432
432
m_options.input .mode == InputMode::CompilerWithASTImport ||
433
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
433
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
434
434
);
435
435
436
436
Json::Value estimates = m_compiler->gasEstimates (_contract);
@@ -473,7 +473,7 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
473
473
474
474
void CommandLineInterface::readInputFiles ()
475
475
{
476
- solAssert (!m_standardJsonInput.has_value (), " " );
476
+ solAssert (!m_standardJsonInput.has_value ());
477
477
478
478
if (
479
479
m_options.input .mode == InputMode::Help ||
@@ -545,8 +545,8 @@ void CommandLineInterface::readInputFiles()
545
545
string fileContent = readFileAsString (infile);
546
546
if (m_options.input .mode == InputMode::StandardJson)
547
547
{
548
- solAssert (!m_standardJsonInput.has_value (), " " );
549
- m_standardJsonInput = std:: move (fileContent);
548
+ solAssert (!m_standardJsonInput.has_value ());
549
+ m_standardJsonInput = move (fileContent);
550
550
}
551
551
else
552
552
{
@@ -559,7 +559,7 @@ void CommandLineInterface::readInputFiles()
559
559
{
560
560
if (m_options.input .mode == InputMode::StandardJson)
561
561
{
562
- solAssert (!m_standardJsonInput.has_value (), " " );
562
+ solAssert (!m_standardJsonInput.has_value ());
563
563
m_standardJsonInput = readUntilEnd (m_sin);
564
564
}
565
565
else
@@ -576,7 +576,7 @@ void CommandLineInterface::readInputFiles()
576
576
577
577
map<string, Json::Value> CommandLineInterface::parseAstFromInput ()
578
578
{
579
- solAssert (m_options.input .mode == InputMode::CompilerWithASTImport, " " );
579
+ solAssert (m_options.input .mode == InputMode::CompilerWithASTImport);
580
580
581
581
map<string, Json::Value> sourceJsons;
582
582
map<string, string> tmpSources;
@@ -606,8 +606,8 @@ map<string, Json::Value> CommandLineInterface::parseAstFromInput()
606
606
607
607
map<string, Json::Value> CommandLineInterface::parseEvmAssemblyJsonFromInput ()
608
608
{
609
- solAssert (m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " " );
610
- solAssert (m_fileReader.sourceUnits ().size () == 1 , " " );
609
+ solAssert (m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport);
610
+ solAssert (m_fileReader.sourceUnits ().size () == 1 );
611
611
612
612
map<string, Json::Value> sourceJsons;
613
613
@@ -627,7 +627,7 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da
627
627
{
628
628
namespace fs = boost::filesystem;
629
629
630
- solAssert (!m_options.output .dir .empty (), " " );
630
+ solAssert (!m_options.output .dir .empty ());
631
631
632
632
// NOTE: create_directories() raises an exception if the path consists solely of '.' or '..'
633
633
// (or equivalent such as './././.'). Paths like 'a/b/.' and 'a/b/..' are fine though.
@@ -707,7 +707,7 @@ void CommandLineInterface::processInput()
707
707
break ;
708
708
case InputMode::StandardJson:
709
709
{
710
- solAssert (m_standardJsonInput.has_value (), " " );
710
+ solAssert (m_standardJsonInput.has_value ());
711
711
712
712
StandardCompiler compiler (m_fileReader.reader (), m_options.formatting .json );
713
713
sout () << compiler.compile (std::move (m_standardJsonInput.value ())) << endl;
@@ -750,7 +750,7 @@ void CommandLineInterface::compile()
750
750
solAssert (
751
751
m_options.input .mode == InputMode::Compiler ||
752
752
m_options.input .mode == InputMode::CompilerWithASTImport ||
753
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
753
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
754
754
);
755
755
756
756
m_compiler = make_unique<CompilerStack>(m_fileReader.reader ());
@@ -872,7 +872,7 @@ void CommandLineInterface::handleCombinedJSON()
872
872
solAssert (
873
873
m_options.input .mode == InputMode::Compiler ||
874
874
m_options.input .mode == InputMode::CompilerWithASTImport ||
875
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
875
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
876
876
);
877
877
878
878
if (!m_options.compiler .combinedJsonRequests .has_value ())
@@ -968,7 +968,7 @@ void CommandLineInterface::handleAst()
968
968
solAssert (
969
969
m_options.input .mode == InputMode::Compiler ||
970
970
m_options.input .mode == InputMode::CompilerWithASTImport ||
971
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
971
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
972
972
);
973
973
974
974
if (!m_options.compiler .outputs .astCompactJson )
@@ -1010,7 +1010,7 @@ void CommandLineInterface::serveLSP()
1010
1010
1011
1011
void CommandLineInterface::link ()
1012
1012
{
1013
- solAssert (m_options.input .mode == InputMode::Linker, " " );
1013
+ solAssert (m_options.input .mode == InputMode::Linker);
1014
1014
1015
1015
// Map from how the libraries will be named inside the bytecode to their addresses.
1016
1016
map<string, h160> librariesReplacements;
@@ -1073,7 +1073,7 @@ void CommandLineInterface::link()
1073
1073
1074
1074
void CommandLineInterface::writeLinkedFiles ()
1075
1075
{
1076
- solAssert (m_options.input .mode == InputMode::Linker, " " );
1076
+ solAssert (m_options.input .mode == InputMode::Linker);
1077
1077
1078
1078
for (auto const & src: m_fileReader.sourceUnits ())
1079
1079
if (src.first == g_stdinFileName)
@@ -1107,14 +1107,14 @@ string CommandLineInterface::objectWithLinkRefsHex(evmasm::LinkerObject const& _
1107
1107
1108
1108
void CommandLineInterface::assemble (yul::YulStack::Language _language, yul::YulStack::Machine _targetMachine)
1109
1109
{
1110
- solAssert (m_options.input .mode == InputMode::Assembler, " " );
1110
+ solAssert (m_options.input .mode == InputMode::Assembler);
1111
1111
1112
1112
bool successful = true ;
1113
1113
map<string, yul::YulStack> yulStacks;
1114
1114
for (auto const & src: m_fileReader.sourceUnits ())
1115
1115
{
1116
1116
// --no-optimize-yul option is not accepted in assembly mode.
1117
- solAssert (!m_options.optimizer .noOptimizeYul , " " );
1117
+ solAssert (!m_options.optimizer .noOptimizeYul );
1118
1118
1119
1119
auto & stack = yulStacks[src.first ] = yul::YulStack (
1120
1120
m_options.output .evmVersion ,
@@ -1194,7 +1194,7 @@ void CommandLineInterface::assemble(yul::YulStack::Language _language, yul::YulS
1194
1194
serr () << " No binary representation found." << endl;
1195
1195
}
1196
1196
1197
- solAssert (_targetMachine == yul::YulStack::Machine::Ewasm || _targetMachine == yul::YulStack::Machine::EVM, " " );
1197
+ solAssert (_targetMachine == yul::YulStack::Machine::Ewasm || _targetMachine == yul::YulStack::Machine::EVM);
1198
1198
if (
1199
1199
(_targetMachine == yul::YulStack::Machine::EVM && m_options.compiler .outputs .asm_ ) ||
1200
1200
(_targetMachine == yul::YulStack::Machine::Ewasm && m_options.compiler .outputs .ewasm )
@@ -1214,7 +1214,7 @@ void CommandLineInterface::outputCompilationResults()
1214
1214
solAssert (
1215
1215
m_options.input .mode == InputMode::Compiler ||
1216
1216
m_options.input .mode == InputMode::CompilerWithASTImport ||
1217
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
1217
+ m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport
1218
1218
);
1219
1219
1220
1220
handleCombinedJSON ();
0 commit comments