From b7013d690f466d67b7480e1a41e5f16f3e38fc5b Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Thu, 29 Nov 2018 05:56:03 +0000 Subject: [TextAPI] Switch back to a custom Platform enum. Moving to PlatformType from BinaryFormat had some UB fallout when handing unknown platforms or malformed input files. This should fix the sanitizer bots. llvm-svn: 347836 --- llvm/lib/TextAPI/MachO/TextStub.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/TextAPI/MachO/TextStub.cpp') diff --git a/llvm/lib/TextAPI/MachO/TextStub.cpp b/llvm/lib/TextAPI/MachO/TextStub.cpp index f46dde6721a..630663d3ea9 100644 --- a/llvm/lib/TextAPI/MachO/TextStub.cpp +++ b/llvm/lib/TextAPI/MachO/TextStub.cpp @@ -515,11 +515,11 @@ template <> struct MappingTraits { std::vector Architectures; std::vector UUIDs; - PlatformType Platform; + PlatformKind Platform{PlatformKind::unknown}; StringRef InstallName; PackedVersion CurrentVersion; PackedVersion CompatibilityVersion; - SwiftVersion SwiftABIVersion; + SwiftVersion SwiftABIVersion{0}; ObjCConstraintType ObjCConstraint{ObjCConstraintType::None}; TBDFlags Flags{TBDFlags::None}; StringRef ParentUmbrella; -- cgit v1.2.3