summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-04-23 16:39:41 +0000
committerAlexander Kornienko <alexfh@google.com>2014-04-23 16:39:41 +0000
commitfe65998777405354fd3d1551a5ec196fa8afbda3 (patch)
treebfa8e6686715df3b2abbce39382d099866868470 /clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
parentfcb3fa13c4aa8971fb8ac209971f9dbe3f77a0b3 (diff)
downloadbcm5719-llvm-fe65998777405354fd3d1551a5ec196fa8afbda3.tar.gz
bcm5719-llvm-fe65998777405354fd3d1551a5ec196fa8afbda3.zip
Don't pass llvm::DenseSet<> by value.
Summary: Fixes massive performance problems on large translation units. Reviewers: jordan_rose Reviewed By: jordan_rose Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3471 llvm-svn: 206999
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index 3ce76e2d7ff..fcea997b83d 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -307,7 +307,7 @@ public:
/// analyzed. This allows to redefine the default inlining policies when
/// analyzing a given function.
ExprEngine::InliningModes
- getInliningModeForFunction(const Decl *D, SetOfConstDecls Visited);
+ getInliningModeForFunction(const Decl *D, const SetOfConstDecls &Visited);
/// \brief Build the call graph for all the top level decls of this TU and
/// use it to define the order in which the functions should be visited.
@@ -414,8 +414,8 @@ void AnalysisConsumer::storeTopLevelDecls(DeclGroupRef DG) {
}
static bool shouldSkipFunction(const Decl *D,
- SetOfConstDecls Visited,
- SetOfConstDecls VisitedAsTopLevel) {
+ const SetOfConstDecls &Visited,
+ const SetOfConstDecls &VisitedAsTopLevel) {
if (VisitedAsTopLevel.count(D))
return true;
@@ -435,7 +435,7 @@ static bool shouldSkipFunction(const Decl *D,
ExprEngine::InliningModes
AnalysisConsumer::getInliningModeForFunction(const Decl *D,
- SetOfConstDecls Visited) {
+ const SetOfConstDecls &Visited) {
// We want to reanalyze all ObjC methods as top level to report Retain
// Count naming convention errors more aggressively. But we should tune down
// inlining when reanalyzing an already inlined function.
OpenPOWER on IntegriCloud