1 //===-- BPFMCAsmInfo.h - BPF asm properties -------------------*- C++ -*--====//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declaration of the BPFMCAsmInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
15 #define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
17 #include "llvm/ADT/Triple.h"
18 #include "llvm/MC/MCAsmInfo.h"
23 class BPFMCAsmInfo : public MCAsmInfo {
25 explicit BPFMCAsmInfo(const Triple &TT) {
26 if (TT.getArch() == Triple::bpfeb)
27 IsLittleEndian = false;
29 PrivateGlobalPrefix = ".L";
30 WeakRefDirective = "\t.weak\t";
32 UsesELFSectionDirectiveForBSS = true;
33 HasSingleParameterDotFile = false;
34 HasDotTypeDotSizeDirective = false;
36 SupportsDebugInformation = true;
37 ExceptionsType = ExceptionHandling::DwarfCFI;
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