|
|
|||
File indexing completed on 2026-05-10 08:43:41
0001 //===- DWARFAttribute.h -----------------------------------------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLVM_DEBUGINFO_DWARF_DWARFATTRIBUTE_H 0010 #define LLVM_DEBUGINFO_DWARF_DWARFATTRIBUTE_H 0011 0012 #include "llvm/BinaryFormat/Dwarf.h" 0013 #include "llvm/DebugInfo/DWARF/DWARFFormValue.h" 0014 #include <cstdint> 0015 0016 namespace llvm { 0017 0018 //===----------------------------------------------------------------------===// 0019 /// Encapsulates a DWARF attribute value and all of the data required to 0020 /// describe the attribute value. 0021 /// 0022 /// This class is designed to be used by clients that want to iterate across all 0023 /// attributes in a DWARFDie. 0024 struct DWARFAttribute { 0025 /// The debug info/types offset for this attribute. 0026 uint64_t Offset = 0; 0027 /// The debug info/types section byte size of the data for this attribute. 0028 uint32_t ByteSize = 0; 0029 /// The attribute enumeration of this attribute. 0030 dwarf::Attribute Attr = dwarf::Attribute(0); 0031 /// The form and value for this attribute. 0032 DWARFFormValue Value; 0033 0034 bool isValid() const { 0035 return Offset != 0 && Attr != dwarf::Attribute(0); 0036 } 0037 0038 explicit operator bool() const { 0039 return isValid(); 0040 } 0041 0042 /// Identify DWARF attributes that may contain a pointer to a location list. 0043 static bool mayHaveLocationList(dwarf::Attribute Attr); 0044 0045 /// Identifies DWARF attributes that may contain a reference to a 0046 /// DWARF expression. 0047 static bool mayHaveLocationExpr(dwarf::Attribute Attr); 0048 }; 0049 0050 } // end namespace llvm 0051 0052 #endif // LLVM_DEBUGINFO_DWARF_DWARFATTRIBUTE_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|