[PATCH] D53708: [ASTImporter] Add importer specific lookup

Gabor Marton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 06:06:36 PST 2018


martong added a comment.

> This is a perhaps a naive comment, but why is localUncachedLookup used

instead of noload_lookup ? There is a fixme dating from 2013 stating
that noload_lookup should be used instead.

This is not a naive question. I was wondering myself on the very same thing when I started working on the ASTImporter at 2017. 
I think when `noload_lookup` was introduced the author of that function tried to replace `localUncachedLookup` in ASTImporter, but that broke some tests. The major difference between the two functions is that the latter can find declarations even if they are not stored in the `LookupPtr`. This is rather unusual from the C/C++ point of view of lookup, and not working in all cases (see the introduction of this patch). Ironically, I can't just get rid of `localUncachedLookup` because it would break some LLDB test cases.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D53708





More information about the llvm-commits mailing list