diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-12-10 11:25:51 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-12-13 01:45:43 +0800 |
commit | 5ac7620045012c2ed565b81978dc35f5f83f7eea (patch) | |
tree | 349169b91c08264dbc7c5e831ceecd6577adf3e8 /libyul/AsmPrinter.cpp | |
parent | e85c3428b483192e8e3d4255d619f31a48c08bef (diff) | |
download | dexon-solidity-5ac7620045012c2ed565b81978dc35f5f83f7eea.tar.gz dexon-solidity-5ac7620045012c2ed565b81978dc35f5f83f7eea.tar.zst dexon-solidity-5ac7620045012c2ed565b81978dc35f5f83f7eea.zip |
Use C++ user-defined literals for creating YulString constants.
Diffstat (limited to 'libyul/AsmPrinter.cpp')
-rw-r--r-- | libyul/AsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libyul/AsmPrinter.cpp b/libyul/AsmPrinter.cpp index eaaba9f3..4bea1f36 100644 --- a/libyul/AsmPrinter.cpp +++ b/libyul/AsmPrinter.cpp @@ -55,8 +55,8 @@ string AsmPrinter::operator()(Literal const& _literal) solAssert(isValidDecimal(_literal.value.str()) || isValidHex(_literal.value.str()), "Invalid number literal"); return _literal.value.str() + appendTypeName(_literal.type); case LiteralKind::Boolean: - solAssert(_literal.value.str() == "true" || _literal.value.str() == "false", "Invalid bool literal."); - return ((_literal.value.str() == "true") ? "true" : "false") + appendTypeName(_literal.type); + solAssert(_literal.value == "true"_yulstring || _literal.value == "false"_yulstring, "Invalid bool literal."); + return ((_literal.value == "true"_yulstring) ? "true" : "false") + appendTypeName(_literal.type); case LiteralKind::String: break; } |