diff options
author | Christian Parpart <christian@ethereum.org> | 2018-11-28 23:19:22 +0800 |
---|---|---|
committer | Christian Parpart <christian@ethereum.org> | 2018-12-01 00:07:12 +0800 |
commit | c48a5264be4221873fe02cac57f6a41a32010fea (patch) | |
tree | 441c9c554fb9521f41f4a143dc138a33afb03589 /libevmasm | |
parent | 22eff22492b2d569fe56b59763ddc1cd1cf9ccf4 (diff) | |
download | dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar.gz dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar.bz2 dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar.lz dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar.xz dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.tar.zst dexon-solidity-c48a5264be4221873fe02cac57f6a41a32010fea.zip |
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
Also, adapted affecting code to those changes.
Diffstat (limited to 'libevmasm')
-rw-r--r-- | libevmasm/Assembly.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index d80f97c4..29d9846d 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -114,10 +114,10 @@ namespace string locationFromSources(StringMap const& _sourceCodes, SourceLocation const& _location) { - if (_location.isEmpty() || _sourceCodes.empty() || _location.start >= _location.end || _location.start < 0) + if (_location.isEmpty() || !_location.source.get() || _sourceCodes.empty() || _location.start >= _location.end || _location.start < 0) return ""; - auto it = _sourceCodes.find(*_location.sourceName); + auto it = _sourceCodes.find(_location.source->name()); if (it == _sourceCodes.end()) return ""; @@ -186,11 +186,11 @@ public: void printLocation() { - if (!m_location.sourceName && m_location.isEmpty()) + if (!m_location.source && m_location.isEmpty()) return; m_out << m_prefix << " /*"; - if (m_location.sourceName) - m_out << " \"" + *m_location.sourceName + "\""; + if (m_location.source) + m_out << " \"" + m_location.source->name() + "\""; if (!m_location.isEmpty()) m_out << ":" << to_string(m_location.start) + ":" + to_string(m_location.end); m_out << " " << locationFromSources(m_sourceCodes, m_location); |