diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h')
-rw-r--r-- | contrib/libs/llvm12/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/libs/llvm12/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h b/contrib/libs/llvm12/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h index 454d1fa7a9..5e86f3898a 100644 --- a/contrib/libs/llvm12/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h +++ b/contrib/libs/llvm12/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h @@ -22,7 +22,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/CodeGen/NonRelocatableStringpool.h" #include "llvm/DWARFLinker/DWARFLinkerCompileUnit.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h" +#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h" #include "llvm/DebugInfo/DWARF/DWARFDie.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" @@ -39,18 +39,18 @@ class CachedPathResolver { public: /// Resolve a path by calling realpath and cache its result. The returned /// StringRef is interned in the given \p StringPool. - StringRef resolve(const std::string &Path, - NonRelocatableStringpool &StringPool) { + StringRef resolve(const std::string &Path, + NonRelocatableStringpool &StringPool) { StringRef FileName = sys::path::filename(Path); - StringRef ParentPath = sys::path::parent_path(Path); + StringRef ParentPath = sys::path::parent_path(Path); // If the ParentPath has not yet been resolved, resolve and cache it for // future look-ups. if (!ResolvedPaths.count(ParentPath)) { SmallString<256> RealPath; sys::fs::real_path(ParentPath, RealPath); - ResolvedPaths.insert( - {ParentPath, std::string(RealPath.c_str(), RealPath.size())}); + ResolvedPaths.insert( + {ParentPath, std::string(RealPath.c_str(), RealPath.size())}); } // Join the file name again with the resolved path. @@ -138,10 +138,10 @@ public: /// /// FIXME: The invalid bit along the return value is to emulate some /// dsymutil-classic functionality. - PointerIntPair<DeclContext *, 1> getChildDeclContext(DeclContext &Context, - const DWARFDie &DIE, - CompileUnit &Unit, - bool InClangModule); + PointerIntPair<DeclContext *, 1> getChildDeclContext(DeclContext &Context, + const DWARFDie &DIE, + CompileUnit &Unit, + bool InClangModule); DeclContext &getRoot() { return Root; } @@ -150,19 +150,19 @@ private: DeclContext Root; DeclContext::Map Contexts; - /// Cached resolved paths from the line table. - /// The key is <UniqueUnitID, FileIdx>. - using ResolvedPathsMap = DenseMap<std::pair<unsigned, unsigned>, StringRef>; - ResolvedPathsMap ResolvedPaths; - - /// Helper that resolves and caches fragments of file paths. + /// Cached resolved paths from the line table. + /// The key is <UniqueUnitID, FileIdx>. + using ResolvedPathsMap = DenseMap<std::pair<unsigned, unsigned>, StringRef>; + ResolvedPathsMap ResolvedPaths; + + /// Helper that resolves and caches fragments of file paths. CachedPathResolver PathResolver; - - /// String pool keeping real path bodies. - NonRelocatableStringpool StringPool; - - StringRef getResolvedPath(CompileUnit &CU, unsigned FileNum, - const DWARFDebugLine::LineTable &LineTable); + + /// String pool keeping real path bodies. + NonRelocatableStringpool StringPool; + + StringRef getResolvedPath(CompileUnit &CU, unsigned FileNum, + const DWARFDebugLine::LineTable &LineTable); }; /// Info type for the DenseMap storing the DeclContext pointers. |