9 #ifndef LLVM_DWARFLINKER_DWARFLINKERDECLCONTEXT_H 10 #define LLVM_DWARFLINKER_DWARFLINKERDECLCONTEXT_H 39 if (!ResolvedPaths.
count(ParentPath)) {
82 : QualifiedNameHash(Hash), Line(Line), ByteSize(ByteSize), Tag(Tag),
83 DefinedInClangModule(0), Name(Name), File(File), Parent(Parent),
84 LastSeenDIE(LastSeenDIE), LastSeenCompileUnitID(CUId) {}
102 unsigned QualifiedNameHash = 0;
105 uint16_t Tag = dwarf::DW_TAG_compile_unit;
106 unsigned DefinedInClangModule : 1;
153 return Ctxt->QualifiedNameHash;
157 if (RHS == getEmptyKey() || RHS == getTombstoneKey())
159 return LHS->QualifiedNameHash == RHS->QualifiedNameHash &&
160 LHS->Line == RHS->Line && LHS->ByteSize == RHS->ByteSize &&
161 LHS->Name.
data() == RHS->Name.
data() &&
162 LHS->File.
data() == RHS->File.
data() &&
163 LHS->Parent.QualifiedNameHash == RHS->Parent.QualifiedNameHash;
169 #endif // LLVM_DWARFLINKER_DWARFLINKERDECLCONTEXT_H A DeclContext is a named program scope that is used for ODR uniquing of types.
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
Info type for the DenseMap storing the DeclContext pointers.
void setDefinedInClangModule(bool Val)
This class represents lattice values for constants.
uint32_t getCanonicalDIEOffset() const
StringRef resolve(std::string Path, NonRelocatableStringpool &StringPool)
Resolve a path by calling realpath and cache its result.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
Stores all information relating to a compile unit, be it in its original instance in the object file ...
StringPool - An interned string pool.
void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
This class gives a tree-like API to the DenseMap that stores the DeclContext objects.
Helper for making strong types.
bool isDefinedInClangModule() const
uint32_t getQualifiedNameHash() const
std::error_code real_path(const Twine &path, SmallVectorImpl< char > &output, bool expand_tilde=false)
Collapse all .
Utility class that carries the DWARF compile/type unit and the debug info entry in an object...
size_type count(StringRef Key) const
count - Return 1 if the element is in the map, 0 otherwise.
PointerIntPair - This class implements a pair of a pointer and small integer.
Allocate memory in an ever growing pool, as if by bump-pointer.
Instrumentation for Order File
A structured debug information entry.
DeclContext(unsigned Hash, uint32_t Line, uint32_t ByteSize, uint16_t Tag, StringRef Name, StringRef File, const DeclContext &Parent, DWARFDie LastSeenDIE=DWARFDie(), unsigned CUId=0)
StringRef parent_path(StringRef path, Style style=Style::native)
Get parent path.
static bool isEqual(const DeclContext *LHS, const DeclContext *RHS)
StringRef getName() const
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
Small helper that resolves and caches file paths.
StringRef filename(StringRef path, Style style=Style::native)
Get filename.
StringRef internString(StringRef S)
Get permanent storage for S (but do not necessarily emit S in the output section).
void setCanonicalDIEOffset(uint32_t Offset)
LLVM_NODISCARD const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
A string table that doesn't need relocations.
static unsigned getHashValue(const DeclContext *Ctxt)
StringRef - Represent a constant reference to a string, i.e.