MC/AsmPrinter: Reduce code duplication.
authorMatthias Braun <matze@braunis.de>
Thu, 14 Dec 2017 03:59:24 +0000 (03:59 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 14 Dec 2017 03:59:24 +0000 (03:59 +0000)
commit5dd72adbecb3c52e1bba6b823fbc4db3f592c8f7
treedce9ca2510f0ca71488ab953bbbf651f413a5f4c
parent123adb507380a9061f66f75420ce7943166ce83f
MC/AsmPrinter: Reduce code duplication.

Factor out duplicated code emitting mach-o version-min specifiers.

This should be NFC but happens to fix a bug where the code in
MCMachoStreamer didn't take the version skew between darwin and macos
versions into account.

llvm-svn: 320666
llvm/include/llvm/MC/MCStreamer.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/MC/MCMachOStreamer.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/test/MC/MachO/diff-with-two-sections.s