//===- SyntheticTypeNameBuilder.h -------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===/ #ifndef LLVM_LIB_DWARFLINKER_PARALLEL_SYNTHETICTYPENAMEBUILDER_H #define LLVM_LIB_DWARFLINKER_PARALLEL_SYNTHETICTYPENAMEBUILDER_H #include "DWARFLinkerCompileUnit.h" #include "DWARFLinkerGlobalData.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" namespace llvm { class DWARFDebugInfoEntry; namespace dwarf_linker { namespace parallel { struct LinkContext; class TypeTableUnit; class CompileUnit; /// The helper class to build type name based on DIE properties. /// It builds synthetic name based on explicit attributes: DW_AT_name, /// DW_AT_linkage_name or based on implicit attributes(DW_AT_decl*). /// Names for specific DIEs(like subprograms, template classes...) include /// additional attributes: subprogram parameters, template parameters, /// array ranges. Examples of built name: /// /// class A { } : {8}A /// /// namspace llvm { class A { } } : {1}llvm{8}A /// /// template <int> structure B { } : {F}B<{0}int> /// /// void foo ( int p1, float p3 ) : {a}void foo({0}int, {0}int) /// /// int *ptr; : {c}ptr {0}int /// /// int var; : {d}var /// /// These names is used to refer DIEs describing types. class SyntheticTypeNameBuilder { … }; /// This class helps to assign indexes for DIE children. /// Indexes are used to create type name for children which /// should be presented in the original order(function parameters, /// array dimensions, enumeration members, class/structure members). class OrderedChildrenIndexAssigner { … }; } // end of namespace parallel } // end of namespace dwarf_linker } // end of namespace llvm #endif // LLVM_LIB_DWARFLINKER_PARALLEL_SYNTHETICTYPENAMEBUILDER_H