aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Serialization
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-04 18:17:30 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-04 18:17:30 +0000
commit12dcc64eebf7aaffb71392fba74fcb69f35d3b2e (patch)
tree14b4e0e12a7d66df7373255cb11db634d4a56ca0 /include/clang/Serialization
parent84d43848e39eab9e3386cbfb3906ba2d6a382f24 (diff)
[PCH] Use DenseMap instead of std::map to keep track of SwitchCases.
Part of rdar://11353109. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r--include/clang/Serialization/ASTReader.h5
-rw-r--r--include/clang/Serialization/ASTWriter.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index 11e237e5b5..d9af6d74af 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -591,13 +591,14 @@ private:
/// indicates how many separate module file load operations have occurred.
unsigned CurrentGeneration;
+ typedef llvm::DenseMap<unsigned, SwitchCase *> SwitchCaseMapTy;
/// \brief Mapping from switch-case IDs in the chain to switch-case statements
///
/// Statements usually don't have IDs, but switch cases need them, so that the
/// switch statement can refer to them.
- std::map<unsigned, SwitchCase *> SwitchCaseStmts;
+ SwitchCaseMapTy SwitchCaseStmts;
- std::map<unsigned, SwitchCase *> *CurrSwitchCaseStmts;
+ SwitchCaseMapTy *CurrSwitchCaseStmts;
/// \brief The number of stat() calls that hit/missed the stat
/// cache.
diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h
index e693f17593..16c3766f8f 100644
--- a/include/clang/Serialization/ASTWriter.h
+++ b/include/clang/Serialization/ASTWriter.h
@@ -337,7 +337,7 @@ private:
SmallVector<Stmt *, 16> *CollectedStmts;
/// \brief Mapping from SwitchCase statements to IDs.
- std::map<SwitchCase *, unsigned> SwitchCaseIDs;
+ llvm::DenseMap<SwitchCase *, unsigned> SwitchCaseIDs;
/// \brief The number of statements written to the AST file.
unsigned NumStatements;