LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MCAsmBackend.cpp
Go to the documentation of this file.
1 //===-- MCAsmBackend.cpp - Target MC Assembly Backend ----------------------==//
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 "llvm/MC/MCAsmBackend.h"
11 #include "llvm/ADT/STLExtras.h"
13 using namespace llvm;
14 
16  : HasReliableSymbolDifference(false), HasDataInCodeSupport(false) {}
17 
19 
20 const MCFixupKindInfo &
22  static const MCFixupKindInfo Builtins[] = {
23  { "FK_Data_1", 0, 8, 0 },
24  { "FK_Data_2", 0, 16, 0 },
25  { "FK_Data_4", 0, 32, 0 },
26  { "FK_Data_8", 0, 64, 0 },
27  { "FK_PCRel_1", 0, 8, MCFixupKindInfo::FKF_IsPCRel },
28  { "FK_PCRel_2", 0, 16, MCFixupKindInfo::FKF_IsPCRel },
29  { "FK_PCRel_4", 0, 32, MCFixupKindInfo::FKF_IsPCRel },
30  { "FK_PCRel_8", 0, 64, MCFixupKindInfo::FKF_IsPCRel },
31  { "FK_GPRel_1", 0, 8, 0 },
32  { "FK_GPRel_2", 0, 16, 0 },
33  { "FK_GPRel_4", 0, 32, 0 },
34  { "FK_GPRel_8", 0, 64, 0 },
35  { "FK_SecRel_1", 0, 8, 0 },
36  { "FK_SecRel_2", 0, 16, 0 },
37  { "FK_SecRel_4", 0, 32, 0 },
38  { "FK_SecRel_8", 0, 64, 0 }
39  };
40 
41  assert((size_t)Kind <= array_lengthof(Builtins) && "Unknown fixup kind");
42  return Builtins[Kind];
43 }
virtual ~MCAsmBackend()
#define false
Definition: ConvertUTF.c:64
size_t array_lengthof(T(&)[N])
Find the length of an array.
Definition: STLExtras.h:250
MCFixupKind
MCFixupKind - Extensible enumeration to represent the type of a fixup.
Definition: MCFixup.h:22
MCFixupKindInfo - Target independent information on a fixup kind.
virtual const MCFixupKindInfo & getFixupKindInfo(MCFixupKind Kind) const
getFixupKindInfo - Get information on a fixup kind.