[PATCH] D55905: Add PLATFORM constants for iOS, tvOS, and watchOS simulators
Michael Trent via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 20 09:54:37 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL349779: Add PLATFORM constants for iOS, tvOS, and watchOS simulators (authored by mtrent, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55905/new/
https://reviews.llvm.org/D55905
Files:
llvm/trunk/include/llvm/BinaryFormat/MachO.h
llvm/trunk/include/llvm/Object/MachO.h
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp
Index: llvm/trunk/include/llvm/BinaryFormat/MachO.h
===================================================================
--- llvm/trunk/include/llvm/BinaryFormat/MachO.h
+++ llvm/trunk/include/llvm/BinaryFormat/MachO.h
@@ -486,7 +486,10 @@
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.
Index: llvm/trunk/include/llvm/Object/MachO.h
===================================================================
--- llvm/trunk/include/llvm/Object/MachO.h
+++ llvm/trunk/include/llvm/Object/MachO.h
@@ -616,6 +616,9 @@
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);
Index: llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp
===================================================================
--- llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp
+++ llvm/trunk/lib/MC/MCParser/DarwinAsmParser.cpp
@@ -1148,7 +1148,10 @@
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");
}
Index: llvm/trunk/lib/MC/MCAsmStreamer.cpp
===================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp
@@ -540,11 +540,14 @@
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");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55905.179095.patch
Type: text/x-patch
Size: 3075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181220/b9eae829/attachment.bin>
More information about the llvm-commits
mailing list