aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmPrinter.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-17 18:21:37 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-26 10:20:10 +0800
commit66eab1caf63f9221a279abf71de953524fe9c2ad (patch)
treedeec1c6b67f411d4a1efdee9400640e5c61a989e /libsolidity/inlineasm/AsmPrinter.cpp
parentb5080860d5f2d141b8fccceaa635378a86c996a8 (diff)
downloaddexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar.gz
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.tar.zst
dexon-solidity-66eab1caf63f9221a279abf71de953524fe9c2ad.zip
Change switch case string to Literal
Diffstat (limited to 'libsolidity/inlineasm/AsmPrinter.cpp')
-rw-r--r--libsolidity/inlineasm/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/inlineasm/AsmPrinter.cpp b/libsolidity/inlineasm/AsmPrinter.cpp
index 92200f84..1ef9d071 100644
--- a/libsolidity/inlineasm/AsmPrinter.cpp
+++ b/libsolidity/inlineasm/AsmPrinter.cpp
@@ -172,10 +172,10 @@ string AsmPrinter::operator()(Switch const& _switch)
string out = "switch " + boost::apply_visitor(*this, *_switch.expression);
for (auto const& _case: _switch.cases)
{
- if (_case.name.empty())
+ if (!_case.value)
out += "\ndefault: ";
else
- out += "\ncase " + _case.name + ": ";
+ out += "\ncase " + (*this)(*_case.value) + ": ";
out += (*this)(_case.body);
}
return out;