LLVM  7.0.0svn
Go to the documentation of this file.
1 //===-- BPFMCAsmInfo.h - BPF asm properties -------------------*- C++ -*--====//
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 // This file contains the declaration of the BPFMCAsmInfo class.
11 //
12 //===----------------------------------------------------------------------===//
17 #include "llvm/ADT/Triple.h"
18 #include "llvm/MC/MCAsmInfo.h"
20 namespace llvm {
21 class Target;
23 class BPFMCAsmInfo : public MCAsmInfo {
24 public:
25  explicit BPFMCAsmInfo(const Triple &TT) {
26  if (TT.getArch() == Triple::bpfeb)
27  IsLittleEndian = false;
29  PrivateGlobalPrefix = ".L";
30  WeakRefDirective = "\t.weak\t";
38  MinInstAlignment = 8;
40  // the default is 4 and it only affects dwarf elf output
41  // so if not set correctly, the dwarf data will be
42  // messed up in random places by 4 bytes. .debug_line
43  // section will be parsable, but with odd offsets and
44  // line numbers, etc.
45  CodePointerSize = 8;
46  }
50  }
51 };
52 }
54 #endif
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:274
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections...
Definition: MCAsmInfo.h:333
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:70
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:270
BPFMCAsmInfo(const Triple &TT)
Definition: BPFMCAsmInfo.h:25
void setDwarfUsesRelocationsAcrossSections(bool enable)
Definition: BPFMCAsmInfo.h:48
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:212
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:284
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:323
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol...
Definition: MCAsmInfo.h:293
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:93
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:63
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:326
No exception support.
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition: MCAsmInfo.h:119