Revert "swift-api-digester: teach the tool to find framework-specific baselines from relative path"

This commit is contained in:
eeckstein
2019-09-01 09:51:06 +02:00
committed by GitHub
parent 2570af66f6
commit 63a3cee0bf
7 changed files with 18 additions and 96 deletions

View File

@@ -586,8 +586,8 @@ static StringRef getKeyContent(SDKContext &Ctx, KeyKind Kind) {
SDKNode* SDKNode::constructSDKNode(SDKContext &Ctx,
llvm::yaml::MappingNode *Node) {
static auto GetScalarString = [&](llvm::yaml::Node *N) -> StringRef {
SmallString<64> Buffer;
return Ctx.buffer(cast<llvm::yaml::ScalarNode>(N)->getValue(Buffer));
auto WithQuote = cast<llvm::yaml::ScalarNode>(N)->getRawValue();
return WithQuote.substr(1, WithQuote.size() - 2);
};
static auto getAsInt = [&](llvm::yaml::Node *N) -> int {
@@ -2102,6 +2102,7 @@ static parseJsonEmit(SDKContext &Ctx, StringRef FileName) {
// previously dumped.
void SwiftDeclCollector::deSerialize(StringRef Filename) {
auto Pair = parseJsonEmit(Ctx, Filename);
OwnedBuffers.push_back(std::move(Pair.first));
RootNode = std::move(Pair.second);
}