LLVM 24.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 : MCAsmInfoELF(TT, Options) {
25 if (TT.getArch() == Triple::bpfeb)
26 IsLittleEndian = false;
27
28 EmitELFStackSection = false;
29
31 WeakRefDirective = "\t.weak\t";
32
35 HasIdentDirective = false;
36
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)
MCAsmInfoELF(const Triple &TT, const MCTargetOptions &Options)
StringRef InternalSymbolPrefix
For internal use by compiler and assembler, not meant to be visible externally.
Definition MCAsmInfo.h:163
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition MCAsmInfo.h:126
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition MCAsmInfo.h:332
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition MCAsmInfo.h:313
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition MCAsmInfo.h:363
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
Definition MCAsmInfo.h:321
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
Definition MCAsmInfo.h:375
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition MCAsmInfo.h:317
bool EmitELFStackSection
Whether a section indicating a (non-)executable stack should be emitted.
Definition MCAsmInfo.h:100
bool IsLittleEndian
True if target is little endian. Default is true.
Definition MCAsmInfo.h:93
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition MCAsmInfo.h:86
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
This is an optimization pass for GlobalISel generic memory operations.