LLVM 19.0.0git
ELFAttributes.h
Go to the documentation of this file.
1//===-- ELFAttributes.h - ELF Attributes ------------------------*- 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#ifndef LLVM_SUPPORT_ELFATTRIBUTES_H
10#define LLVM_SUPPORT_ELFATTRIBUTES_H
11
12#include "llvm/ADT/ArrayRef.h"
13#include "llvm/ADT/StringRef.h"
14#include <optional>
15
16namespace llvm {
17
19 unsigned attr;
21};
22
24
25namespace ELFAttrs {
26
27enum AttrType : unsigned { File = 1, Section = 2, Symbol = 3 };
28
29StringRef attrTypeAsString(unsigned attr, TagNameMap tagNameMap,
30 bool hasTagPrefix = true);
31std::optional<unsigned> attrTypeFromString(StringRef tag, TagNameMap tagNameMap);
32
33// Magic numbers for ELF attributes.
34enum AttrMagic { Format_Version = 0x41 };
35
36} // namespace ELFAttrs
37} // namespace llvm
38#endif
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
std::optional< unsigned > attrTypeFromString(StringRef tag, TagNameMap tagNameMap)
StringRef attrTypeAsString(unsigned attr, TagNameMap tagNameMap, bool hasTagPrefix=true)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18