emrekultursay created this revision. emrekultursay requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
There are two DataExtractors in scope: one from the llvm namespace and one from the lldb_private namespace. Some Microsoft Visual C++ compilers (I tested with MSVC 14.23 specifically) cannot handle this situation, and generate ambiguous symbol errors. This change fixes this compile error. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120718 Files: lldb/include/lldb/Core/DataFileCache.h lldb/source/Core/DataFileCache.cpp Index: lldb/source/Core/DataFileCache.cpp =================================================================== --- lldb/source/Core/DataFileCache.cpp +++ lldb/source/Core/DataFileCache.cpp @@ -219,7 +219,7 @@ return true; } -bool CacheSignature::Decode(const DataExtractor &data, +bool CacheSignature::Decode(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr) { Clear(); while (uint8_t sig_encoding = data.GetU8(offset_ptr)) { @@ -284,7 +284,7 @@ return true; } -bool StringTableReader::Decode(const DataExtractor &data, +bool StringTableReader::Decode(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr) { llvm::StringRef identifier((const char *)data.GetData(offset_ptr, 4), 4); if (identifier != kStringTableIdentifier) Index: lldb/include/lldb/Core/DataFileCache.h =================================================================== --- lldb/include/lldb/Core/DataFileCache.h +++ lldb/include/lldb/Core/DataFileCache.h @@ -161,7 +161,8 @@ /// /// \return /// True if the signature was successfully decoded, false otherwise. - bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr); + bool Decode(const lldb_private::DataExtractor &data, + lldb::offset_t *offset_ptr); }; /// Many cache files require string tables to store data efficiently. This @@ -204,7 +205,8 @@ llvm::StringRef Get(uint32_t offset) const; - bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr); + bool Decode(const lldb_private::DataExtractor &data, + lldb::offset_t *offset_ptr); protected: /// All of the strings in the string table are contained in m_data.
Index: lldb/source/Core/DataFileCache.cpp =================================================================== --- lldb/source/Core/DataFileCache.cpp +++ lldb/source/Core/DataFileCache.cpp @@ -219,7 +219,7 @@ return true; } -bool CacheSignature::Decode(const DataExtractor &data, +bool CacheSignature::Decode(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr) { Clear(); while (uint8_t sig_encoding = data.GetU8(offset_ptr)) { @@ -284,7 +284,7 @@ return true; } -bool StringTableReader::Decode(const DataExtractor &data, +bool StringTableReader::Decode(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr) { llvm::StringRef identifier((const char *)data.GetData(offset_ptr, 4), 4); if (identifier != kStringTableIdentifier) Index: lldb/include/lldb/Core/DataFileCache.h =================================================================== --- lldb/include/lldb/Core/DataFileCache.h +++ lldb/include/lldb/Core/DataFileCache.h @@ -161,7 +161,8 @@ /// /// \return /// True if the signature was successfully decoded, false otherwise. - bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr); + bool Decode(const lldb_private::DataExtractor &data, + lldb::offset_t *offset_ptr); }; /// Many cache files require string tables to store data efficiently. This @@ -204,7 +205,8 @@ llvm::StringRef Get(uint32_t offset) const; - bool Decode(const DataExtractor &data, lldb::offset_t *offset_ptr); + bool Decode(const lldb_private::DataExtractor &data, + lldb::offset_t *offset_ptr); protected: /// All of the strings in the string table are contained in m_data.
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits