[all-commits] [llvm/llvm-project] bc7f1d: [lldb][NFC] Explicitly ask for a ClangASTContext i...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Fri Nov 29 04:29:13 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bc7f1df6b61a3c8f88f2541ef9ba73f4ee0ee4fe
      https://github.com/llvm/llvm-project/commit/bc7f1df6b61a3c8f88f2541ef9ba73f4ee0ee4fe
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2019-11-29 (Fri, 29 Nov 2019)

  Changed paths:
    M lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
    M lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
    M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
    M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
    M lldb/source/Symbol/ClangASTContext.cpp

  Log Message:
  -----------
  [lldb][NFC] Explicitly ask for a ClangASTContext in ClangASTSource

ClangASTSource currently takes a clang::ASTContext and keeps that
around, but a lot of LLDB's functionality for doing operations
on a clang::ASTContext is in its ClangASTContext twin class. We
currently constantly recompute the respective ClangASTContext
from the clang::ASTContext while we instead could just pass and
store a ClangASTContext in the ClangASTSource. This also allows
us to get rid of a bunch of unreachable error checking for cases
where recomputation fails for some reason.




More information about the All-commits mailing list