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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205084 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover
2014-03-29 07:34:53 +00:00
parent 0301154c0e
commit 1330ee3189
10 changed files with 325 additions and 3 deletions

View File

@@ -19,6 +19,7 @@
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCDirectives.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCLinkerOptimizationHint.h"
#include "llvm/MC/MCWin64EH.h"
#include "llvm/Support/DataTypes.h"
#include <string>
@@ -466,6 +467,10 @@ public:
///
virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) = 0;
/// \brief Emit a Linker Optimization Hint (LOH) directive.
/// \param Args - Arguments of the LOH.
virtual void EmitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) {}
/// EmitCommonSymbol - Emit a common symbol.
///
/// @param Symbol - The common symbol to emit.