diff options
-rw-r--r-- | llvm/include/llvm/BinaryFormat/MachO.h | 5 | ||||
-rw-r--r-- | llvm/include/llvm/Object/MachO.h | 3 | ||||
-rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 13 | ||||
-rw-r--r-- | llvm/lib/MC/MCParser/DarwinAsmParser.cpp | 5 |
4 files changed, 19 insertions, 7 deletions
diff --git a/llvm/include/llvm/BinaryFormat/MachO.h b/llvm/include/llvm/BinaryFormat/MachO.h index c5294c76ebf..b3d60984249 100644 --- a/llvm/include/llvm/BinaryFormat/MachO.h +++ b/llvm/include/llvm/BinaryFormat/MachO.h @@ -486,7 +486,10 @@ enum PlatformType { PLATFORM_IOS = 2, PLATFORM_TVOS = 3, PLATFORM_WATCHOS = 4, - PLATFORM_BRIDGEOS = 5 + PLATFORM_BRIDGEOS = 5, + PLATFORM_IOSSIMULATOR = 7, + PLATFORM_TVOSSIMULATOR = 8, + PLATFORM_WATCHOSSIMULATOR = 9 }; // Values for tools enum in build_tool_version. diff --git a/llvm/include/llvm/Object/MachO.h b/llvm/include/llvm/Object/MachO.h index 159c1765ab8..09e0a78de44 100644 --- a/llvm/include/llvm/Object/MachO.h +++ b/llvm/include/llvm/Object/MachO.h @@ -616,6 +616,9 @@ public: case MachO::PLATFORM_TVOS: return "tvos"; case MachO::PLATFORM_WATCHOS: return "watchos"; case MachO::PLATFORM_BRIDGEOS: return "bridgeos"; + case MachO::PLATFORM_IOSSIMULATOR: return "iossimulator"; + case MachO::PLATFORM_TVOSSIMULATOR: return "tvossimulator"; + case MachO::PLATFORM_WATCHOSSIMULATOR: return "watchossimulator"; default: std::string ret; raw_string_ostream ss(ret); diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index fd10c6901b7..4f0efab73e8 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -540,11 +540,14 @@ void MCAsmStreamer::EmitVersionMin(MCVersionMinType Type, unsigned Major, static const char *getPlatformName(MachO::PlatformType Type) { switch (Type) { - case MachO::PLATFORM_MACOS: return "macos"; - case MachO::PLATFORM_IOS: return "ios"; - case MachO::PLATFORM_TVOS: return "tvos"; - case MachO::PLATFORM_WATCHOS: return "watchos"; - case MachO::PLATFORM_BRIDGEOS: return "bridgeos"; + case MachO::PLATFORM_MACOS: return "macos"; + case MachO::PLATFORM_IOS: return "ios"; + case MachO::PLATFORM_TVOS: return "tvos"; + case MachO::PLATFORM_WATCHOS: return "watchos"; + case MachO::PLATFORM_BRIDGEOS: return "bridgeos"; + case MachO::PLATFORM_IOSSIMULATOR: return "iossimulator"; + case MachO::PLATFORM_TVOSSIMULATOR: return "tvossimulator"; + case MachO::PLATFORM_WATCHOSSIMULATOR: return "watchossimulator"; } llvm_unreachable("Invalid Mach-O platform type"); } diff --git a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp index 07926d6c1c9..cd99112292a 100644 --- a/llvm/lib/MC/MCParser/DarwinAsmParser.cpp +++ b/llvm/lib/MC/MCParser/DarwinAsmParser.cpp @@ -1148,7 +1148,10 @@ static Triple::OSType getOSTypeFromPlatform(MachO::PlatformType Type) { case MachO::PLATFORM_IOS: return Triple::IOS; case MachO::PLATFORM_TVOS: return Triple::TvOS; case MachO::PLATFORM_WATCHOS: return Triple::WatchOS; - case MachO::PLATFORM_BRIDGEOS: /* silence warning */break; + case MachO::PLATFORM_BRIDGEOS: /* silence warning */ break; + case MachO::PLATFORM_IOSSIMULATOR: /* silence warning */ break; + case MachO::PLATFORM_TVOSSIMULATOR: /* silence warning */ break; + case MachO::PLATFORM_WATCHOSSIMULATOR: /* silence warning */ break; } llvm_unreachable("Invalid mach-o platform type"); } |