From: Cyndy Ishida Date: Thu, 23 Feb 2023 06:23:33 +0000 (-0800) Subject: [llvm][TextAPI] add Default FileType value to InterfaceFile Objects X-Git-Tag: upstream/17.0.6~16713 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e61e761643a887fca7ef2dbae14a6b96de67fa5d;p=platform%2Fupstream%2Fllvm.git [llvm][TextAPI] add Default FileType value to InterfaceFile Objects * This silences msan errors --- diff --git a/llvm/include/llvm/TextAPI/InterfaceFile.h b/llvm/include/llvm/TextAPI/InterfaceFile.h index 2ee22ee..7d20c6f 100644 --- a/llvm/include/llvm/TextAPI/InterfaceFile.h +++ b/llvm/include/llvm/TextAPI/InterfaceFile.h @@ -442,7 +442,7 @@ private: TargetList Targets; std::string Path; - FileType FileKind; + FileType FileKind{FileType::Invalid}; std::string InstallName; PackedVersion CurrentVersion; PackedVersion CompatibilityVersion; diff --git a/llvm/unittests/TextAPI/TextStubV3Tests.cpp b/llvm/unittests/TextAPI/TextStubV3Tests.cpp index b97b6a2..65b2f2d 100644 --- a/llvm/unittests/TextAPI/TextStubV3Tests.cpp +++ b/llvm/unittests/TextAPI/TextStubV3Tests.cpp @@ -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"); diff --git a/llvm/unittests/TextAPI/TextStubV4Tests.cpp b/llvm/unittests/TextAPI/TextStubV4Tests.cpp index 39dac0a..f474641 100644 --- a/llvm/unittests/TextAPI/TextStubV4Tests.cpp +++ b/llvm/unittests/TextAPI/TextStubV4Tests.cpp @@ -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");