LLVM  3.7.0
BPFMCAsmInfo.h
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 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
15 #define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
16 
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/MC/MCAsmInfo.h"
19 #include "llvm/ADT/Triple.h"
20 
21 namespace llvm {
22 class Target;
23 class Triple;
24 
25 class BPFMCAsmInfo : public MCAsmInfo {
26 public:
27  explicit BPFMCAsmInfo(const Triple &TT) {
28  if (TT.getArch() == Triple::bpfeb)
29  IsLittleEndian = false;
30 
31  PrivateGlobalPrefix = ".L";
32  WeakRefDirective = "\t.weak\t";
33 
37  }
38 };
39 }
40 
41 #endif
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:273
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:72
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:269
const char * PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition: MCAsmInfo.h:127
BPFMCAsmInfo(const Triple &TT)
Definition: BPFMCAsmInfo.h:27
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:211
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:242
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:58
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol...
Definition: MCAsmInfo.h:288
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44