summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-06-25 21:21:08 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-06-25 21:21:08 +0000
commit4830ec82605352b8b40f9175c0303c6019cca0d0 (patch)
treebe97aed828862e6c79140abda1084cc344b9cee6 /clang/lib
parent4688e608612d9582e150815f39a2b6a5d60596fd (diff)
downloadbcm5719-llvm-4830ec82605352b8b40f9175c0303c6019cca0d0.tar.gz
bcm5719-llvm-4830ec82605352b8b40f9175c0303c6019cca0d0.zip
Use std::map instead of llvm::DenseMap because we rely on the stability of references to values in these maps. PR13197.
llvm-svn: 159161
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ExprConstant.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index e9cce9f23ae..b16ba8fb52e 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -287,7 +287,9 @@ namespace {
/// parameters' function scope indices.
const APValue *Arguments;
- typedef llvm::DenseMap<const Expr*, APValue> MapTy;
+ // Note that we intentionally use std::map here so that references to
+ // values are stable.
+ typedef std::map<const Expr*, APValue> MapTy;
typedef MapTy::const_iterator temp_iterator;
/// Temporaries - Temporary lvalues materialized within this stack frame.
MapTy Temporaries;
@@ -361,7 +363,9 @@ namespace {
/// NextCallIndex - The next call index to assign.
unsigned NextCallIndex;
- typedef llvm::DenseMap<const OpaqueValueExpr*, APValue> MapTy;
+ // Note that we intentionally use std::map here so that references
+ // to values are stable.
+ typedef std::map<const OpaqueValueExpr*, APValue> MapTy;
/// OpaqueValues - Values used as the common expression in a
/// BinaryConditionalOperator.
MapTy OpaqueValues;
OpenPOWER on IntegriCloud