JSONNodeDumper.cpp - VisitIntegerLiteral - avoid APSInt::toString std::string wrapper. NFCI

Pulled out of D103888 - use the underlying SmallString version directly
This commit is contained in:
Simon Pilgrim 2021-06-09 11:09:19 +01:00
parent d806d11b14
commit f3fd36e590

View File

@ -1414,9 +1414,10 @@ void JSONNodeDumper::VisitCXXDependentScopeMemberExpr(
}
void JSONNodeDumper::VisitIntegerLiteral(const IntegerLiteral *IL) {
JOS.attribute("value",
IL->getValue().toString(
/*Radix=*/10, IL->getType()->isSignedIntegerType()));
llvm::SmallString<16> Buffer;
IL->getValue().toString(Buffer,
/*Radix=*/10, IL->getType()->isSignedIntegerType());
JOS.attribute("value", Buffer);
}
void JSONNodeDumper::VisitCharacterLiteral(const CharacterLiteral *CL) {
// FIXME: This should probably print the character literal as a string,