mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
swift-api-digester: teach the tool to find framework-specific baselines from relative path
The framework baselines are installed at 'lib/swift/FrameworkABIBaseline' and the tool is inside 'bin'. This patch teaches the executable to locate baselines from the relative path. In addition, this patch moves the stdlib ABI/API baselines to the canonical location so we don't have to check the stability of the stdlib using a different mechanism from other Swift frameworks.
This commit is contained in:
@@ -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 {
|
||||
auto WithQuote = cast<llvm::yaml::ScalarNode>(N)->getRawValue();
|
||||
return WithQuote.substr(1, WithQuote.size() - 2);
|
||||
SmallString<64> Buffer;
|
||||
return Ctx.buffer(cast<llvm::yaml::ScalarNode>(N)->getValue(Buffer));
|
||||
};
|
||||
|
||||
static auto getAsInt = [&](llvm::yaml::Node *N) -> int {
|
||||
@@ -2102,7 +2102,6 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user