aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-30 06:50:46 +0800
committerchriseth <chris@ethereum.org>2017-06-09 22:40:14 +0800
commitf0d213e6b56da5be8088008bf2ceadb7fd0030f7 (patch)
tree1e53cb0fef34276b90f2768ac107ebf831ac2c87 /solc/CommandLineInterface.cpp
parentfe3b46554af07b35f84ca48264830f8c27d4e52e (diff)
downloaddexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar.gz
dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.tar.zst
dexon-solidity-f0d213e6b56da5be8088008bf2ceadb7fd0030f7.zip
Introduce MachineAssemblyObject
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index b2e257ee..e755c3b5 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -1082,9 +1082,10 @@ bool CommandLineInterface::assemble(
"eWasm";
cout << endl << "======= " << src.first << " (" << machine << ") =======" << endl;
AssemblyStack& stack = assemblyStacks[src.first];
+ MachineAssemblyObject object;
try
{
- cout << stack.assemble(_targetMachine).toHex() << endl;
+ object = stack.assemble(_targetMachine);
}
catch (Exception const& _exception)
{
@@ -1096,6 +1097,10 @@ bool CommandLineInterface::assemble(
cerr << "Unknown exception while assembling." << endl;
return false;
}
+ if (object.bytecode)
+ cout << object.bytecode->toHex() << endl;
+ else
+ cerr << "No binary representation found." << endl;
cout << stack.print() << endl;
}