Preprocessor; do not write macro usage in dump output if it is empty
This commit is contained in:
parent
447bea5c18
commit
140aa6afb4
|
@ -958,19 +958,21 @@ void Preprocessor::dump(std::ostream &out) const
|
||||||
}
|
}
|
||||||
out << " </directivelist>" << std::endl;
|
out << " </directivelist>" << std::endl;
|
||||||
|
|
||||||
out << " <macro-usage>" << std::endl;
|
if (!mMacroUsage.empty()) {
|
||||||
for (const simplecpp::MacroUsage ¯oUsage: mMacroUsage) {
|
out << " <macro-usage>" << std::endl;
|
||||||
out << " <macro "
|
for (const simplecpp::MacroUsage ¯oUsage: mMacroUsage) {
|
||||||
<< " name=\"" << macroUsage.macroName << "\""
|
out << " <macro "
|
||||||
<< " file=\"" << macroUsage.macroLocation.file() << "\""
|
<< " name=\"" << macroUsage.macroName << "\""
|
||||||
<< " line=\"" << macroUsage.macroLocation.line << "\""
|
<< " file=\"" << macroUsage.macroLocation.file() << "\""
|
||||||
<< " column=\"" << macroUsage.macroLocation.col << "\""
|
<< " line=\"" << macroUsage.macroLocation.line << "\""
|
||||||
<< " usefile=\"" << macroUsage.useLocation.file() << "\""
|
<< " column=\"" << macroUsage.macroLocation.col << "\""
|
||||||
<< " useline=\"" << macroUsage.useLocation.line << "\""
|
<< " usefile=\"" << macroUsage.useLocation.file() << "\""
|
||||||
<< " usecolumn=\"" << macroUsage.useLocation.col << "\""
|
<< " useline=\"" << macroUsage.useLocation.line << "\""
|
||||||
<< " known-value=\"" << (macroUsage.macroValueKnown ? 1 : 0) << "\"/>" << std::endl;
|
<< " usecolumn=\"" << macroUsage.useLocation.col << "\""
|
||||||
|
<< " known-value=\"" << (macroUsage.macroValueKnown ? 1 : 0) << "\"/>" << std::endl;
|
||||||
|
}
|
||||||
|
out << " </macro-usage>" << std::endl;
|
||||||
}
|
}
|
||||||
out << " </macro-usage>" << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const std::uint32_t crc32Table[] = {
|
static const std::uint32_t crc32Table[] = {
|
||||||
|
|
Loading…
Reference in New Issue