summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-12-14 00:12:46 +0000
committerMatthias Braun <matze@braunis.de>2017-12-14 00:12:46 +0000
commit0148c88c080cce52c09bd9bfc4dd2127734a6a9e (patch)
tree75fe343be05f900e3dc0e5b8aec67e790995e718 /llvm/lib/MC/MCMachOStreamer.cpp
parent2c1fa4feb183b7168d98f5dba8984b9dfde4ab31 (diff)
downloadbcm5719-llvm-0148c88c080cce52c09bd9bfc4dd2127734a6a9e.tar.gz
bcm5719-llvm-0148c88c080cce52c09bd9bfc4dd2127734a6a9e.zip
MC: Add support for mach-o build_version
LC_BUILD_VERSION is a new load command superseding the previously used LC_XXX_MIN_VERSION commands. This adds an assembler directive along with encoding/streaming support. llvm-svn: 320661
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCMachOStreamer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp
index a5c1b13df7c..6e1dca82033 100644
--- a/llvm/lib/MC/MCMachOStreamer.cpp
+++ b/llvm/lib/MC/MCMachOStreamer.cpp
@@ -88,6 +88,8 @@ public:
void EmitDataRegion(MCDataRegionType Kind) override;
void EmitVersionMin(MCVersionMinType Kind, unsigned Major,
unsigned Minor, unsigned Update) override;
+ void EmitBuildVersion(unsigned Platform, unsigned Major,
+ unsigned Minor, unsigned Update) override;
void EmitThumbFunc(MCSymbol *Func) override;
bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
@@ -265,7 +267,13 @@ void MCMachOStreamer::EmitDataRegion(MCDataRegionType Kind) {
void MCMachOStreamer::EmitVersionMin(MCVersionMinType Kind, unsigned Major,
unsigned Minor, unsigned Update) {
- getAssembler().setVersionMinInfo(Kind, Major, Minor, Update);
+ getAssembler().setVersionMin(Kind, Major, Minor, Update);
+}
+
+void MCMachOStreamer::EmitBuildVersion(unsigned Platform, unsigned Major,
+ unsigned Minor, unsigned Update) {
+ getAssembler().setBuildVersion((MachO::PlatformType)Platform, Major, Minor,
+ Update);
}
void MCMachOStreamer::EmitThumbFunc(MCSymbol *Symbol) {
OpenPOWER on IntegriCloud