Go to the documentation of this file.
9 #ifndef LLVM_DWARFLINKER_DWARFLINKERDECLCONTEXT_H
10 #define LLVM_DWARFLINKER_DWARFLINKERDECLCONTEXT_H
43 if (!ResolvedPaths.
count(ParentPath)) {
47 {ParentPath, std::string(RealPath.
c_str(), RealPath.size())});
87 : QualifiedNameHash(Hash), Line(Line), ByteSize(ByteSize),
Tag(
Tag),
88 DefinedInClangModule(0), Name(Name), File(File), Parent(Parent),
89 LastSeenDIE(LastSeenDIE), LastSeenCompileUnitID(CUId) {}
110 unsigned QualifiedNameHash = 0;
114 unsigned DefinedInClangModule : 1;
120 std::atomic<uint32_t> CanonicalDIEOffset = {0};
121 bool HasCanonicalDIE =
false;
155 ResolvedPathsMap ResolvedPaths;
173 return Ctxt->QualifiedNameHash;
177 if (
RHS == getEmptyKey() ||
RHS == getTombstoneKey())
179 return LHS->QualifiedNameHash ==
RHS->QualifiedNameHash &&
180 LHS->Line ==
RHS->Line &&
LHS->ByteSize ==
RHS->ByteSize &&
181 LHS->Name.data() ==
RHS->Name.data() &&
182 LHS->File.data() ==
RHS->File.data() &&
183 LHS->Parent.QualifiedNameHash ==
RHS->Parent.QualifiedNameHash;
189 #endif // LLVM_DWARFLINKER_DWARFLINKERDECLCONTEXT_H
This is an optimization pass for GlobalISel generic memory operations.
bool isDefinedInClangModule() const
A DeclContext is a named program scope that is used for ODR uniquing of types.
void setDefinedInClangModule(bool Val)
StringRef resolve(const std::string &Path, NonRelocatableStringpool &StringPool)
Resolve a path by calling realpath and cache its result.
A structured debug information entry.
void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
An information struct used to provide DenseMap with the various necessary components for a given valu...
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
uint32_t getQualifiedNameHash() const
std::error_code real_path(const Twine &path, SmallVectorImpl< char > &output, bool expand_tilde=false)
Collapse all .
bool setLastSeenDIE(CompileUnit &U, const DWARFDie &Die)
Set the last DIE/CU a context was seen in and, possibly invalidate the context if it is ambiguous.
StringRef internString(StringRef S)
Get permanent storage for S (but do not necessarily emit S in the output section).
void setHasCanonicalDIE()
PointerIntPair< DeclContext *, 1 > getChildDeclContext(DeclContext &Context, const DWARFDie &DIE, CompileUnit &Unit, bool InClangModule)
Get the child of Context described by DIE in Unit.
uint32_t getCanonicalDIEOffset() const
Small helper that resolves and caches file paths.
static unsigned getHashValue(const DeclContext *Ctxt)
Allocate memory in an ever growing pool, as if by bump-pointer.
Stores all information relating to a compile unit, be it in its original instance in the object file ...
This class gives a tree-like API to the DenseMap that stores the DeclContext objects.
static bool isEqual(const DeclContext *LHS, const DeclContext *RHS)
StringRef parent_path(StringRef path, Style style=Style::native)
Get parent path.
void setCanonicalDIEOffset(uint32_t Offset)
StringRef - Represent a constant reference to a string, i.e.
Analysis the ScalarEvolution expression for r is this
A string table that doesn't need relocations.
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)
size_type count(StringRef Key) const
count - Return 1 if the element is in the map, 0 otherwise.
Info type for the DenseMap storing the DeclContext pointers.
PointerIntPair - This class implements a pair of a pointer and small integer.
StringRef filename(StringRef path, Style style=Style::native)
Get filename.
bool hasCanonicalDIE() const
Utility class that carries the DWARF compile/type unit and the debug info entry in an object.