SBSourceManager now gets the real source manager either from the Debugger or Target. Also, move the SourceManager file cache into the debugger
so it can be shared amongst the targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139564 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index be6873b..d068726 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -357,12 +357,11 @@
}
}
-SBSourceManager &
+SBSourceManager
SBDebugger::GetSourceManager ()
{
- static SourceManager g_lldb_source_manager(NULL);
- static SBSourceManager g_sb_source_manager (&g_lldb_source_manager);
- return g_sb_source_manager;
+ SBSourceManager sb_source_manager (*this);
+ return sb_source_manager;
}