diff options
author | Tim Northover <tnorthover@apple.com> | 2015-10-28 22:36:05 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-10-28 22:36:05 +0000 |
commit | 2d4d1615197efeb044f62d6a8721704839cd5337 (patch) | |
tree | 80c103f916b365a001660bd021d2130c367b34b9 /llvm/lib/CodeGen | |
parent | 748b3ffe3b8d83e2405e41c572cc19bc9f211053 (diff) | |
download | bcm5719-llvm-2d4d1615197efeb044f62d6a8721704839cd5337.tar.gz bcm5719-llvm-2d4d1615197efeb044f62d6a8721704839cd5337.zip |
ARM: support .watchos_version_min and .tvos_version_min.
These MachO file directives are used by linkers and other tools to provide
compatibility information, much like the existing .ios_version_min and
.macosx_version_min.
llvm-svn: 251569
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index f073118fd00..00762ca0ca8 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -196,10 +196,18 @@ bool AsmPrinter::doInitialization(Module &M) { unsigned Major, Minor, Update; TT.getOSVersion(Major, Minor, Update); // If there is a version specified, Major will be non-zero. - if (Major) - OutStreamer->EmitVersionMin((TT.isMacOSX() ? - MCVM_OSXVersionMin : MCVM_IOSVersionMin), - Major, Minor, Update); + if (Major) { + MCVersionMinType VersionType; + if (TT.isWatchOS()) + VersionType = MCVM_WatchOSVersionMin; + else if (TT.isTvOS()) + VersionType = MCVM_TvOSVersionMin; + else if (TT.isMacOSX()) + VersionType = MCVM_OSXVersionMin; + else + VersionType = MCVM_IOSVersionMin; + OutStreamer->EmitVersionMin(VersionType, Major, Minor, Update); + } } // Allow the target to emit any magic that it wants at the start of the file. |