Go to the documentation of this file.
9 #ifndef LLDB_TARGET_PATHMAPPINGLIST_H
10 #define LLDB_TARGET_PATHMAPPINGLIST_H
14 #include "llvm/Support/JSON.h"
37 void Append(llvm::StringRef path, llvm::StringRef replacement,
bool notify);
43 bool AppendUnique(llvm::StringRef path, llvm::StringRef replacement,
46 void Clear(
bool notify);
51 llvm::json::Value
ToJSON();
60 void Insert(llvm::StringRef path, llvm::StringRef replacement,
63 bool Remove(
size_t index,
bool notify);
67 bool Replace(llvm::StringRef path, llvm::StringRef replacement,
bool notify);
69 bool Replace(llvm::StringRef path, llvm::StringRef replacement,
93 std::optional<FileSpec>
RemapPath(llvm::StringRef path,
94 bool only_if_exists =
false)
const;
134 typedef std::pair<ConstString, ConstString>
pair;
151 #endif // LLDB_TARGET_PATHMAPPINGLIST_H
collection::iterator iterator
collection::const_iterator const_iterator
bool GetPathsAtIndex(uint32_t idx, ConstString &path, ConstString &new_path) const
std::optional< FileSpec > FindFile(const FileSpec &orig_spec) const
Finds a source file given a file spec using the path remappings.
std::vector< pair > collection
bool AppendUnique(llvm::StringRef path, llvm::StringRef replacement, bool notify)
Append <path, replacement> pair without duplication.
uint32_t FindIndexForPath(llvm::StringRef path) const
void Insert(llvm::StringRef path, llvm::StringRef replacement, uint32_t insert_idx, bool notify)
void(* ChangedCallback)(const PathMappingList &path_list, void *baton)
llvm::json::Value ToJSON()
bool Replace(llvm::StringRef path, llvm::StringRef replacement, bool notify)
string(SUBSTRING ${p} 10 -1 pStripped) if($
void Append(llvm::StringRef path, llvm::StringRef replacement, bool notify)
const PathMappingList & operator=(const PathMappingList &rhs)
ChangedCallback m_callback
uint32_t GetModificationID() const
std::pair< ConstString, ConstString > pair
std::optional< llvm::StringRef > ReverseRemapPath(const FileSpec &file, FileSpec &fixed) const
Perform reverse source path remap for input file.
void Dump(Stream *s, int pair_index=-1)
A class that represents a running process on the host machine.
iterator FindIteratorForPath(ConstString path)
bool Remove(size_t index, bool notify)
bool RemapPath(ConstString path, ConstString &new_path) const