Requestify the mangling-to-metadata APIs.

Note that I've called out a couple of suspicious places where we
are requesting abstract metadata for superclasses but probably
need to be requesting something more complete.
This commit is contained in:
John McCall
2019-02-05 16:15:59 -05:00
parent de4564877a
commit d07efd37e0
7 changed files with 90 additions and 68 deletions

View File

@@ -175,14 +175,15 @@ TEST_F(CompatibilityOverrideTest, test_swift_conformsToSwiftProtocol) {
TEST_F(CompatibilityOverrideTest, test_swift_getTypeByMangledNode) {
Demangler demangler;
auto Result = swift_getTypeByMangledNode(demangler, nullptr, nullptr,
nullptr);
ASSERT_EQ((const Metadata *)Result, nullptr);
auto Result = swift_getTypeByMangledNode(MetadataState::Abstract,
demangler, nullptr, nullptr,nullptr);
ASSERT_EQ(Result.getMetadata(), nullptr);
}
TEST_F(CompatibilityOverrideTest, test_swift_getTypeByMangledName) {
auto Result = swift_getTypeByMangledName("", nullptr, nullptr);
ASSERT_EQ((const Metadata *)Result, nullptr);
auto Result = swift_getTypeByMangledName(MetadataState::Abstract,
"", nullptr, nullptr);
ASSERT_EQ(Result.getMetadata(), nullptr);
}
TEST_F(CompatibilityOverrideTest, test_swift_getAssociatedTypeWitnessSlow) {