summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index f1459d9d0a1..20381e4c83f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -254,28 +254,8 @@ bool AsmPrinter::doInitialization(Module &M) {
// alternative is duplicated code in each of the target asm printers that
// use the directive, where it would need the same conditionalization
// anyway.
- const Triple &TT = TM.getTargetTriple();
- // If there is a version specified, Major will be non-zero.
- if (TT.isOSDarwin() && TT.getOSMajorVersion() != 0) {
- unsigned Major, Minor, Update;
- MCVersionMinType VersionType;
- if (TT.isWatchOS()) {
- VersionType = MCVM_WatchOSVersionMin;
- TT.getWatchOSVersion(Major, Minor, Update);
- } else if (TT.isTvOS()) {
- VersionType = MCVM_TvOSVersionMin;
- TT.getiOSVersion(Major, Minor, Update);
- } else if (TT.isMacOSX()) {
- VersionType = MCVM_OSXVersionMin;
- if (!TT.getMacOSXVersion(Major, Minor, Update))
- Major = 0;
- } else {
- VersionType = MCVM_IOSVersionMin;
- TT.getiOSVersion(Major, Minor, Update);
- }
- if (Major != 0)
- OutStreamer->EmitVersionMin(VersionType, Major, Minor, Update);
- }
+ const Triple &Target = TM.getTargetTriple();
+ OutStreamer->EmitVersionForTarget(Target);
// Allow the target to emit any magic that it wants at the start of the file.
EmitStartOfAsmFile(M);
OpenPOWER on IntegriCloud