//===- lib/MC/MachObjectWriter.cpp - Mach-O File Writer -------------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===//#include"llvm/MC/MCMachObjectWriter.h"#include"llvm/ADT/OwningPtr.h"#include"llvm/ADT/StringMap.h"#include"llvm/ADT/Twine.h"#include"llvm/MC/MCAssembler.h"#include"llvm/MC/MCAsmLayout.h"#include"llvm/MC/MCExpr.h"#include"llvm/MC/MCObjectWriter.h"#include"llvm/MC/MCSectionMachO.h"#include"llvm/MC/MCSymbol.h"#include"llvm/MC/MCMachOSymbolFlags.h"#include"llvm/MC/MCValue.h"#include"llvm/Object/MachOFormat.h"#include"llvm/Support/ErrorHandling.h"#include"llvm/Target/TargetAsmBackend.h"// FIXME: Gross.#include"../Target/ARM/ARMFixupKinds.h"#include"../Target/X86/X86FixupKinds.h"#include<vector>usingnamespacellvm;usingnamespacellvm::object;// FIXME: this has been copied from (or to) X86AsmBackend.cppstaticunsignedgetFixupKindLog2Size(unsignedKind){switch(Kind){// FIXME: Until ARM has it's own relocation stuff spun off, it comes// through here and we don't want it to puke all over. Any reasonable// values will only come when ARM relocation support gets added, at which// point this will be X86 only again and the llvm_unreachable can be// re-enabled.default:return0;// llvm_unreachable("invalid fixup kind!");caseFK_PCRel_1