summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-03-29 07:34:53 +0000
committerTim Northover <tnorthover@apple.com>2014-03-29 07:34:53 +0000
commit53d32518512bb30d0c43376bdd334ddfa0dbcd64 (patch)
treeb5df1bf6cf477afa53cf56c89c5fe8d51dbf5eff /llvm/lib/MC/MCMachOStreamer.cpp
parent5627670e8429c811032971211cfe3da89f0221b4 (diff)
downloadbcm5719-llvm-53d32518512bb30d0c43376bdd334ddfa0dbcd64.tar.gz
bcm5719-llvm-53d32518512bb30d0c43376bdd334ddfa0dbcd64.zip
MachO: Add linker-optimisation hint framework to MC.
Another part of the ARM64 backend (so tests will be following soon). This is currently used by the linker to relax adrp/ldr pairs into nops where possible, though could well be more broadly applicable. llvm-svn: 205084
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCMachOStreamer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp
index 742f7846496..7e437f4bcb8 100644
--- a/llvm/lib/MC/MCMachOStreamer.cpp
+++ b/llvm/lib/MC/MCMachOStreamer.cpp
@@ -17,6 +17,7 @@
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
+#include "llvm/MC/MCLinkerOptimizationHint.h"
#include "llvm/MC/MCMachOSymbolFlags.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCObjectStreamer.h"
@@ -104,6 +105,10 @@ public:
llvm_unreachable("macho doesn't support this directive");
}
+ void EmitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) override {
+ getAssembler().getLOHContainer().addDirective(Kind, Args);
+ }
+
void FinishImpl() override;
};
OpenPOWER on IntegriCloud