[lldb][NFC] Create the ASTContext in ClangASTContext exactly once.
authorRaphael Isemann <teemperor@gmail.com>
Wed, 2 Oct 2019 12:26:08 +0000 (12:26 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Wed, 2 Oct 2019 12:26:08 +0000 (12:26 +0000)
commit2eb963abff8e65f79e5c4ac0787ebd65d501e3dd
tree514eb56117d9462dd6be8b90efbb7baf1e93f778
parentb1fe6c90e66b11f0fbb282a0fc760040faf53021
[lldb][NFC] Create the ASTContext in ClangASTContext exactly once.

Reason for this patch is the Ssame reason as for the previous patches:
Having a ClangASTContext and being able to switch the associated ASTContext isn't
a use case we have (or should have), so let's simplify all this code.
This way it becomes clearer in what order we initialize data structures.

The DWARFASTParserClangTests changes are necessary as the test is using
a ClangASTContext but relied on the fact that no called function ever calls
getASTContext() on our ClangASTContext (as that would create the ASTContext).
As we now always create the ASTContext the fact that we had an uninitialized
FileSystem made the test crash.

llvm-svn: 373457
lldb/include/lldb/Symbol/ClangASTContext.h
lldb/source/Symbol/ClangASTContext.cpp
lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp