aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorBruno Ricci <riccibrun@gmail.com>2018-08-06 16:47:31 +0000
committerBruno Ricci <riccibrun@gmail.com>2018-08-06 16:47:31 +0000
commitb619883c760a4a3eeed3c7c1934488165e2a87fb (patch)
treea92ff4285ccbd75128f1f2460b86036158c51baf /clang/unittests/Basic/VirtualFileSystemTest.cpp
parent0d3b0f4f72e5909e83cddecea4c385627288b09c (diff)
downloadllvm-b619883c760a4a3eeed3c7c1934488165e2a87fb.zip
llvm-b619883c760a4a3eeed3c7c1934488165e2a87fb.tar.gz
llvm-b619883c760a4a3eeed3c7c1934488165e2a87fb.tar.bz2
[AST] Remove unnecessary indirections in DeclarationNameTable
DeclarationNameTable currently hold 3 "void *" to FoldingSet<CXXSpecialName>, FoldingSet<CXXLiteralOperatorIdName> and FoldingSet<CXXDeductionGuideNameExtra>. CXXSpecialName, CXXLiteralOperatorIdName and CXXDeductionGuideNameExtra are private classes holding extra information about a "special" declaration name and are in AST/DeclarationName.cpp. The original intent seems to have been to keep these classes private and only expose DeclarationNameExtra and DeclarationName (the code dates from 2008 and has not been significantly changed since). However this make the code less straightforward than necessary because of the need to have "void *" in DeclarationNameTable (with 1 of 3 comments wrong) and to manually allocate/deallocate the FoldingSets. Moreover removing the extra indirections reduce the run-time of an fsyntax-only on all of Boost by 2.3% which is not totally unexpected given how frequently this data structure is used (especially for C++). A concern raised by erichkeane during the review was that including Type.h would increase the compile time unreasonably. However test builds (both clean and incremental) showed that this patch did not result in any compile time increase. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D50261 llvm-svn: 339030
Diffstat (limited to 'clang/unittests/Basic/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions