LLVM 22.0.0git
BPFMCAsmInfo.h
Go to the documentation of this file.
1//===-- BPFMCAsmInfo.h - BPF asm properties -------------------*- C++ -*--====//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the declaration of the BPFMCAsmInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
14#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
15
18
19namespace llvm {
20
21class BPFMCAsmInfo : public MCAsmInfoELF {
22public:
23 explicit BPFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options) {
24 if (TT.getArch() == Triple::bpfeb)
25 IsLittleEndian = false;
26
29 WeakRefDirective = "\t.weak\t";
30
34 HasIdentDirective = false;
35
39
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.
46 }
47
51};
52}
53
54#endif
static LVOptions Options
Definition LVOptions.cpp:25
BPFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options)
void setDwarfUsesRelocationsAcrossSections(bool enable)
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition MCAsmInfo.h:123
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition MCAsmInfo.h:359
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition MCAsmInfo.h:160
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition MCAsmInfo.h:325
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition MCAsmInfo.h:164
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition MCAsmInfo.h:306
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition MCAsmInfo.h:263
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition MCAsmInfo.h:356
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
Definition MCAsmInfo.h:314
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
Definition MCAsmInfo.h:370
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition MCAsmInfo.h:310
bool IsLittleEndian
True if target is little endian. Default is true.
Definition MCAsmInfo.h:94
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition MCAsmInfo.h:87
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:47
This is an optimization pass for GlobalISel generic memory operations.
@ DwarfCFI
DWARF-like instruction based exceptions.
Definition CodeGen.h:55