HomePhabricator

[lldb][NFC] Create the ASTContext in ClangASTContext exactly once.

Authored by teemperor on Oct 2 2019, 5:26 AM.

Description

[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

Details

Committed
teemperorOct 2 2019, 5:26 AM
Parents
rGb1fe6c90e66b: NFC: directly return when CommonExitBlock != Succ
Branches
Unknown
Tags
Unknown