aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-03 03:49:52 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-03 03:49:52 +0000
commit8bc27822fc867d43399d4474bccbb58b7b7c7ad7 (patch)
treec2f70b8b1461eb509604f1538c98e4ec336973de /include/clang
parentd977e6b0eb4c9b57b0aad6e9e0be39cc67b3a8c7 (diff)
[PCH] Make sure that the SourceExpr of a OpaqueValueExpr is always initialized
when deserialized, fixing random crashes in libclang. Also simplifies how OpaqueValueExprs are [de]serialized. The reader/writer automatically retains pointer equality of sub-statements (when a statement node is referenced in multiple nodes), so no need to manually handle it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Serialization/ASTReader.h3
-rw-r--r--include/clang/Serialization/ASTWriter.h6
2 files changed, 0 insertions, 9 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index 203abe403c..552d1a5bff 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -585,9 +585,6 @@ private:
/// switch statement can refer to them.
std::map<unsigned, SwitchCase *> SwitchCaseStmts;
- /// \brief Mapping from opaque value IDs to OpaqueValueExprs.
- std::map<unsigned, OpaqueValueExpr*> OpaqueValueExprs;
-
/// \brief The number of stat() calls that hit/missed the stat
/// cache.
unsigned NumStatHits, NumStatMisses;
diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h
index fd2b9ec77e..7dd018d9fe 100644
--- a/include/clang/Serialization/ASTWriter.h
+++ b/include/clang/Serialization/ASTWriter.h
@@ -321,9 +321,6 @@ private:
/// \brief Mapping from SwitchCase statements to IDs.
std::map<SwitchCase *, unsigned> SwitchCaseIDs;
- /// \brief Mapping from OpaqueValueExpr expressions to IDs.
- llvm::DenseMap<OpaqueValueExpr *, unsigned> OpaqueValues;
-
/// \brief The number of statements written to the AST file.
unsigned NumStatements;
@@ -643,9 +640,6 @@ public:
void ClearSwitchCaseIDs();
- /// \brief Retrieve the ID for the given opaque value expression.
- unsigned getOpaqueValueID(OpaqueValueExpr *e);
-
unsigned getDeclParmVarAbbrev() const { return DeclParmVarAbbrev; }
unsigned getDeclRefExprAbbrev() const { return DeclRefExprAbbrev; }
unsigned getCharacterLiteralAbbrev() const { return CharacterLiteralAbbrev; }