//===-- ARMAsmPrinter.cpp - Print machine code to an ARM .s file ----------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file contains a printer that converts from our internal representation// of machine-dependent LLVM code to GAS-format ARM assembly language.////===----------------------------------------------------------------------===//#define DEBUG_TYPE "asm-printer"#include"ARM.h"#include"ARMBuildAttrs.h"#include"ARMAddressingModes.h"#include"ARMConstantPoolValue.h"#include"InstPrinter/ARMInstPrinter.h"#include"ARMAsmPrinter.h"#include"ARMMachineFunctionInfo.h"#include"ARMTargetMachine.h"#include"ARMTargetObjectFile.h"#include"llvm/Analysis/DebugInfo.h"#include"llvm/Constants.h"#include"llvm/Module.h"#include"llvm/Type.h"#include"llvm/Assembly/Writer.h"#include"llvm/CodeGen/MachineModuleInfoImpls.h"#include"llvm/CodeGen/MachineFunctionPass.h"#include"llvm/CodeGen/MachineJumpTableInfo.h"#include"llvm/MC/MCAsmInfo.h"#include"llvm/MC/MCAssembler.h"#include"llvm/MC/MCContext.h"#include"llvm/MC/MCExpr.h"#include"llvm/MC/MCInst.h"#include"llvm/MC/MCSectionMachO.h"#include"llvm/MC/MCObjectStreamer.h"#include"llvm/MC/MCStreamer.h"#include"llvm/MC/MCSymbol.h"#include"llvm/Target/Mangler.h"#include"llvm/Target/TargetData.h"#include"llvm/Target/TargetMachine.h"#include"llvm/Target/TargetOptions.h"#include"llvm/Target/TargetRegistry.h"#include"llvm/ADT/SmallPtrSet.h"#include"llvm/ADT/SmallString.h"#include"llvm/ADT/StringExtras.h"#include"llvm/Support/CommandLine.h"#include"llvm/Support/Debug.h"#include"llvm/Support/ErrorHandling.h"#include"llvm/Support/raw_ostream.h"#include<cctype>usingnamespacellvm;namespace{// Per section and per symbol attributes are not supported.// To implement them we would need the ability to delay this emission// until the assembly file is fully parsed/generated as only then do we// know the symbol and section numbers.classAttributeEmitter{public:virtualvoidMaybeSwitchVendor(StringRefVendor)=0;virtualvoidEmitAttribute(unsignedAttribute,unsignedValue)=0;virtualvoidFinish()=0;virtual~AttributeEmitter(){}};classAsmAttributeEmitter