LLVM 22.0.0git
DWARFAttribute.h
Go to the documentation of this file.
1//===- DWARFAttribute.h -----------------------------------------*- 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_DEBUGINFO_DWARF_DWARFATTRIBUTE_H
10#define LLVM_DEBUGINFO_DWARF_DWARFATTRIBUTE_H
11
15#include <cstdint>
16
17namespace llvm {
18
19//===----------------------------------------------------------------------===//
20/// Encapsulates a DWARF attribute value and all of the data required to
21/// describe the attribute value.
22///
23/// This class is designed to be used by clients that want to iterate across all
24/// attributes in a DWARFDie.
26 /// The debug info/types offset for this attribute.
28 /// The debug info/types section byte size of the data for this attribute.
30 /// The attribute enumeration of this attribute.
32 /// The form and value for this attribute.
34
35 bool isValid() const {
36 return Offset != 0 && Attr != dwarf::Attribute(0);
37 }
38
39 explicit operator bool() const {
40 return isValid();
41 }
42
43 /// Identify DWARF attributes that may contain a pointer to a location list.
45
46 /// Identifies DWARF attributes that may contain a reference to a
47 /// DWARF expression.
49};
50
51} // end namespace llvm
52
53#endif // LLVM_DEBUGINFO_DWARF_DWARFATTRIBUTE_H
#define LLVM_ABI
Definition: Compiler.h:213
This file contains constants used for implementing Dwarf debug support.
Attribute
Attributes.
Definition: Dwarf.h:124
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Encapsulates a DWARF attribute value and all of the data required to describe the attribute value.
bool isValid() const
uint64_t Offset
The debug info/types offset for this attribute.
static LLVM_ABI bool mayHaveLocationList(dwarf::Attribute Attr)
Identify DWARF attributes that may contain a pointer to a location list.
Definition: DWARFDie.cpp:737
DWARFFormValue Value
The form and value for this attribute.
uint32_t ByteSize
The debug info/types section byte size of the data for this attribute.
static LLVM_ABI bool mayHaveLocationExpr(dwarf::Attribute Attr)
Identifies DWARF attributes that may contain a reference to a DWARF expression.
Definition: DWARFDie.cpp:754
dwarf::Attribute Attr
The attribute enumeration of this attribute.