summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-05-19 01:39:10 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-05-19 01:39:10 +0000
commit301bc21fd0d767a30192156aa8ae05da56d33fe1 (patch)
tree5a145a5b6137600c472fd0fdf1b93e449b279667 /clang/lib/Sema/SemaCodeComplete.cpp
parentf981ec4582a4c4e8411cda3bd311c461afcd96f6 (diff)
downloadbcm5719-llvm-301bc21fd0d767a30192156aa8ae05da56d33fe1.tar.gz
bcm5719-llvm-301bc21fd0d767a30192156aa8ae05da56d33fe1.zip
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%. llvm-svn: 270009
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 3f5afab7bf5..ef14660135b 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -1517,7 +1517,6 @@ static void AddOrdinaryNameResults(Sema::ParserCompletionContext CCC,
ResultBuilder &Results) {
CodeCompletionAllocator &Allocator = Results.getAllocator();
CodeCompletionBuilder Builder(Allocator, Results.getCodeCompletionTUInfo());
- PrintingPolicy Policy = getCompletionPrintingPolicy(SemaRef);
typedef CodeCompletionResult Result;
switch (CCC) {
OpenPOWER on IntegriCloud