summaryrefslogtreecommitdiff
path: root/lldb/source/Symbol/ObjectFile.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2021-07-02 16:17:25 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2021-07-02 16:21:47 -0700
commit6b0d266036f73f5ee9556d211a7d0946091ff3b2 (patch)
tree17093bbfca8793fc5e6cb6b6da4aff7c030a7f89 /lldb/source/Symbol/ObjectFile.cpp
parent52b5491a212a78e93e869b43ec325ddbd8832784 (diff)
Revert "Create synthetic symbol names on demand to improve memory consumption and startup times."
This reverts commit c8164d0276b97679e80db01adc860271ab4a5d11 and 43f6dad2344247976d5777f56a1fc29e39c6c717 because it breaks TestDyldTrieSymbols.py on GreenDragon.
Diffstat (limited to 'lldb/source/Symbol/ObjectFile.cpp')
-rw-r--r--lldb/source/Symbol/ObjectFile.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 101af01341a2..b0fdd50b3c0f 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -616,6 +616,16 @@ ObjectFile::GetSymbolTypeFromName(llvm::StringRef name,
return symbol_type_hint;
}
+ConstString ObjectFile::GetNextSyntheticSymbolName() {
+ llvm::SmallString<256> name;
+ llvm::raw_svector_ostream os(name);
+ ConstString file_name = GetModule()->GetFileSpec().GetFilename();
+ ++m_synthetic_symbol_idx;
+ os << "___lldb_unnamed_symbol" << m_synthetic_symbol_idx << "$$"
+ << file_name.GetStringRef();
+ return ConstString(os.str());
+}
+
std::vector<ObjectFile::LoadableData>
ObjectFile::GetLoadableData(Target &target) {
std::vector<LoadableData> loadables;