LLVM 22.0.0git
ELFAttributeParser.h
Go to the documentation of this file.
1//===- ELF AttributeParser.h - ELF Attribute Parser -------------*- 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_ELFATTRIBUTEPARSER_H
10#define LLVM_SUPPORT_ELFATTRIBUTEPARSER_H
11
12#include "llvm/ADT/ArrayRef.h"
13#include "llvm/ADT/StringRef.h"
14#include "llvm/Support/Error.h"
15
16namespace llvm {
17
19public:
21
23 return llvm::Error::success();
24 }
25 virtual std::optional<unsigned>
26 getAttributeValue(StringRef BuildAttrSubsectionName, unsigned Tag) const {
27 return std::nullopt;
28 }
29 virtual std::optional<unsigned> getAttributeValue(unsigned Tag) const {
30 return std::nullopt;
31 }
32 virtual std::optional<StringRef>
33 getAttributeString(StringRef BuildAttrSubsectionName, unsigned Tag) const {
34 return std::nullopt;
35 }
36 virtual std::optional<StringRef> getAttributeString(unsigned Tag) const {
37 return std::nullopt;
38 }
39};
40
41} // namespace llvm
42#endif // LLVM_SUPPORT_ELFATTRIBUTEPARSER_H
endianness Endian
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
virtual std::optional< unsigned > getAttributeValue(StringRef BuildAttrSubsectionName, unsigned Tag) const
virtual std::optional< StringRef > getAttributeString(unsigned Tag) const
virtual Error parse(ArrayRef< uint8_t > Section, llvm::endianness Endian)
virtual std::optional< unsigned > getAttributeValue(unsigned Tag) const
virtual std::optional< StringRef > getAttributeString(StringRef BuildAttrSubsectionName, unsigned Tag) const
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
static ErrorSuccess success()
Create a success value.
Definition: Error.h:336
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
endianness
Definition: bit.h:71