Pass DebugInfoSelection down to the code handling assembly printing

This commit is contained in:
Kamil Śliwak
2021-10-11 20:34:48 +02:00
parent f7c4ed849d
commit bcfefc79d9
28 changed files with 170 additions and 47 deletions
+3 -5
View File
@@ -304,14 +304,12 @@ string AsmPrinter::formatSourceLocation(
string AsmPrinter::formatDebugData(shared_ptr<DebugData const> const& _debugData, bool _statement)
{
DebugInfoSelection debugInfoSelection = DebugInfoSelection::Default();
if (!_debugData || debugInfoSelection.none())
if (!_debugData || m_debugInfoSelection.none())
return "";
vector<string> items;
if (auto id = _debugData->astID)
if (debugInfoSelection.astID)
if (m_debugInfoSelection.astID)
items.emplace_back("@ast-id " + to_string(*id));
if (
@@ -324,7 +322,7 @@ string AsmPrinter::formatDebugData(shared_ptr<DebugData const> const& _debugData
items.emplace_back(formatSourceLocation(
_debugData->originLocation,
m_nameToSourceIndex,
debugInfoSelection,
m_debugInfoSelection,
m_soliditySourceProvider
));
}