[PATCH] D64554: [CrossTU] Add a function to retrieve original source location.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 03:52:31 PDT 2019


balazske marked an inline comment as done.
balazske added inline comments.


================
Comment at: include/clang/AST/ASTImporter.h:317
+                std::shared_ptr<ASTImporterSharedState> SharedState = nullptr,
+                ASTUnit *Unit = nullptr);
 
----------------
martong wrote:
> What if we provided an additional constructor where we take over the ASTUnits instead of the ASTContexts?
> Then we would not need to pass the FileManagers neither.
> ```
>     ASTImporter(ASTUnit &ToUnit, 
>                 ASTUnit &FromUnit,
>                 bool MinimalImport,
>                 std::shared_ptr<ASTImporterSharedState> SharedState = nullptr,
> ```
Is the `SharedState==nullptr` case only for LLDB? If yes then it is possible to have a "LLDB" constructor when no shared state and no ASTUnit is needed. And another for CTU case when a From and To ASTUnit is specified and a shared state (theoretically minimal can be true in any case but probably only true for LLDB?).


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64554/new/

https://reviews.llvm.org/D64554





More information about the cfe-commits mailing list