ABIChecker: add an API to document that SDKNodeRoot contains single module name. NFC

This commit is contained in:
Xi Ge
2023-09-18 10:37:55 -07:00
parent 26653a7344
commit 49eefc0b67
2 changed files with 8 additions and 0 deletions

View File

@@ -2107,6 +2107,13 @@ void SDKNodeRoot::jsonize(json::Output &out) {
out.mapOptional(getKeyContent(Ctx, KeyKind::KK_tool_arguments).data(), ToolArgs);
}
llvm::Optional<StringRef> SDKNodeRoot::getSingleModuleName() const {
auto rawName = getName();
if (rawName == "MULTI_MODULE" || rawName == "NO_MODULE")
return llvm::None;
return rawName;
}
void SDKNodeConformance::jsonize(json::Output &out) {
SDKNode::jsonize(out);
output(out, KeyKind::KK_usr, Usr);