]> granicus.if.org Git - clang/commit
Make Sema::getPrintingPolicy less ridiculously expensive. This used to perform
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 19 May 2016 01:39:10 +0000 (01:39 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 19 May 2016 01:39:10 +0000 (01:39 +0000)
commit30a63fba50e0b6e0822e381685575cf84f20f353
treed804f4b0264a4548e60da650cf43903146004ee7
parentef93d505ba65ed01b8b75759b377904e44c72326
Make Sema::getPrintingPolicy less ridiculously expensive. This used to perform
an identifier table lookup, *and* copy the LangOptions (including various
std::vector<std::string>s). Twice. We call this function once each time we start
parsing a declaration specifier sequence, and once for each call to Sema::Diag.

This reduces the compile time for a sample .c file from the linux kernel by 20%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270009 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTContext.h
include/clang/AST/PrettyPrinter.h
lib/AST/DeclarationName.cpp
lib/AST/StmtPrinter.cpp
lib/AST/TypePrinter.cpp
lib/Parse/ParseDecl.cpp
lib/Sema/Sema.cpp
lib/Sema/SemaCodeComplete.cpp
test/Analysis/initializers-cfg-output.cpp
test/Analysis/temp-obj-dtors-cfg-output.cpp
test/SemaCXX/member-pointer.cpp