aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-31 18:21:48 +0000
committerDan Gohman <gohman@apple.com>2009-07-31 18:21:48 +0000
commit1e5054ec946c02828eded452741139f7b983450e (patch)
tree78382aec42d600063f793c4e9c4c1743f65e4bbd /include/llvm
parent1c068e44ef5eec070a51dbd7e9e4133ab92d09b0 (diff)
downloadexternal_llvm-1e5054ec946c02828eded452741139f7b983450e.zip
external_llvm-1e5054ec946c02828eded452741139f7b983450e.tar.gz
external_llvm-1e5054ec946c02828eded452741139f7b983450e.tar.bz2
Fix some problems with ASTCallbackVH in its use as a DenseMap key.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/AliasSetTracker.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h
index 99d7ce8..1fb4c8f 100644
--- a/include/llvm/Analysis/AliasSetTracker.h
+++ b/include/llvm/Analysis/AliasSetTracker.h
@@ -259,12 +259,19 @@ class AliasSetTracker {
virtual void deleted();
public:
ASTCallbackVH(Value *V, AliasSetTracker *AST = 0);
+ ASTCallbackVH &operator=(Value *V);
+ };
+ /// ASTCallbackVHDenseMapInfo - Traits to tell DenseMap that ASTCallbackVH
+ /// is not a POD (it needs its destructor called).
+ struct ASTCallbackVHDenseMapInfo : public DenseMapInfo<Value *> {
+ static bool isPod() { return false; }
};
AliasAnalysis &AA;
ilist<AliasSet> AliasSets;
- typedef DenseMap<ASTCallbackVH, AliasSet::PointerRec*, DenseMapInfo<Value*> >
+ typedef DenseMap<ASTCallbackVH, AliasSet::PointerRec*,
+ ASTCallbackVHDenseMapInfo>
PointerMapType;
// Map from pointers to their node