LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ARMTargetObjectFile.cpp
Go to the documentation of this file.
1 //===-- llvm/Target/ARMTargetObjectFile.cpp - ARM Object Info Impl --------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "ARMTargetObjectFile.h"
11 #include "ARMSubtarget.h"
12 #include "llvm/ADT/StringExtras.h"
13 #include "llvm/MC/MCContext.h"
14 #include "llvm/MC/MCExpr.h"
15 #include "llvm/MC/MCSectionELF.h"
16 #include "llvm/Support/Dwarf.h"
17 #include "llvm/Support/ELF.h"
18 #include "llvm/Target/Mangler.h"
20 using namespace llvm;
21 using namespace dwarf;
22 
23 //===----------------------------------------------------------------------===//
24 // ELF Target
25 //===----------------------------------------------------------------------===//
26 
28  const TargetMachine &TM) {
29  bool isAAPCS_ABI = TM.getSubtarget<ARMSubtarget>().isAAPCS_ABI();
31  InitializeELF(isAAPCS_ABI);
32 
33  if (isAAPCS_ABI) {
34  LSDASection = NULL;
35  }
36 
37  AttributesSection =
38  getContext().getELFSection(".ARM.attributes",
39  ELF::SHT_ARM_ATTRIBUTES,
40  0,
42 }
43 
46  MachineModuleInfo *MMI, unsigned Encoding,
47  MCStreamer &Streamer) const {
48  assert(Encoding == DW_EH_PE_absptr && "Can handle absptr encoding only");
49 
50  return MCSymbolRefExpr::Create(getSymbol(*Mang, GV),
52  getContext());
53 }
virtual void Initialize(MCContext &ctx, const TargetMachine &TM)
const MCExpr * getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang, MachineModuleInfo *MMI, unsigned Encoding, MCStreamer &Streamer) const
static const MCSymbolRefExpr * Create(const MCSymbol *Symbol, MCContext &Ctx)
Definition: MCExpr.h:270
const STC & getSubtarget() const
static SectionKind getMetadata()
Definition: SectionKind.h:207
virtual void Initialize(MCContext &Ctx, const TargetMachine &TM)