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

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 22 00:38:07 PDT 2019


balazske created this revision.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp.
Herald added a reviewer: martong.
Herald added a reviewer: shafik.
Herald added a project: clang.

A new function will be added to get the original SourceLocation
for a SourceLocation that was imported as result of getCrossTUDefinition.
The returned SourceLocation is in the context of the (original)
SourceManager for the original source file. Additionally the
ASTUnit object for that source file is returned. This is needed
to get a SourceManager to operate on with the returned source location.

The new function works if multiple different source files are loaded
with the same CrossTU context.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65064

Files:
  clang/include/clang/AST/ASTImporter.h
  clang/include/clang/CrossTU/CrossTranslationUnit.h
  clang/lib/AST/ASTImporter.cpp
  clang/lib/CrossTU/CrossTranslationUnit.cpp
  clang/unittests/CrossTU/CrossTranslationUnitTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65064.211024.patch
Type: text/x-patch
Size: 11008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190722/a6c1be09/attachment.bin>


More information about the cfe-commits mailing list