[lldb] Fix SourceManager::SourceFileCache insertion
authorEmre Kultursay <emrekultursay@google.com>
Mon, 20 Apr 2020 14:17:27 +0000 (16:17 +0200)
committerPavel Labath <pavel@labath.sk>
Mon, 20 Apr 2020 14:25:54 +0000 (16:25 +0200)
commit1f820fa4feda34d25e62762392c50049e5282330
treeafb8e4f5af3af86a73f2846974439c13efb73595
parentacae69d08c88b701e25318f8d4100f5542c44407
[lldb] Fix SourceManager::SourceFileCache insertion

Summary:
Lookup and subsequent insert was done using uninitialized
FileSpec object, which caused the cache to be a no-op.

Bug: llvm.org/PR45310

Depends on D76804.

Reviewers: labath, JDevlieghere

Reviewed By: labath

Subscribers: mgorny, jingham, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76805
lldb/source/Core/SourceManager.cpp
lldb/unittests/Core/CMakeLists.txt
lldb/unittests/Core/SourceManagerTest.cpp [new file with mode: 0644]