[llvm][TextAPI] add Default FileType value to InterfaceFile Objects

* This silences msan errors
This commit is contained in:
Cyndy Ishida 2023-02-22 22:23:33 -08:00
parent 3fac87b677
commit e61e761643
3 changed files with 3 additions and 1 deletions

View File

@ -442,7 +442,7 @@ private:
TargetList Targets;
std::string Path;
FileType FileKind;
FileType FileKind{FileType::Invalid};
std::string InstallName;
PackedVersion CurrentVersion;
PackedVersion CompatibilityVersion;

View File

@ -940,6 +940,7 @@ TEST(TBDv3, InterfaceInequality) {
}));
EXPECT_TRUE(checkEqualityOnTransform(FileA, FileB, [](InterfaceFile *File) {
InterfaceFile Document;
Document.setFileType(FileType::TBD_V3);
Document.addTargets(TargetList{Target(AK_armv7, PLATFORM_IOS),
Target(AK_arm64, PLATFORM_IOS)});
Document.setInstallName("/System/Library/Frameworks/A.framework/A");

View File

@ -1166,6 +1166,7 @@ TEST(TBDv4, InterfaceInequality) {
}));
EXPECT_TRUE(checkEqualityOnTransform(FileA, FileB, [](InterfaceFile *File) {
InterfaceFile Document;
Document.setFileType(FileType::TBD_V4);
Document.addTargets(TargetList{Target(AK_i386, PLATFORM_MACOS),
Target(AK_x86_64, PLATFORM_MACOS)});
Document.setInstallName("/System/Library/Frameworks/A.framework/A");