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
This commit is contained in:
Dan Gohman
2009-07-31 18:21:48 +00:00
parent 29384efb76
commit a818c30d66
2 changed files with 14 additions and 5 deletions

View File

@ -586,10 +586,12 @@ void AliasSetTracker::ASTCallbackVH::deleted() {
}
AliasSetTracker::ASTCallbackVH::ASTCallbackVH(Value *V, AliasSetTracker *ast)
: CallbackVH(V == DenseMapInfo<Value *>::getEmptyKey() ? 0 :
V == DenseMapInfo<Value *>::getTombstoneKey() ? 0 :
V),
AST(ast) {}
: CallbackVH(V), AST(ast) {}
AliasSetTracker::ASTCallbackVH &
AliasSetTracker::ASTCallbackVH::operator=(Value *V) {
return *this = ASTCallbackVH(V, AST);
}
//===----------------------------------------------------------------------===//
// AliasSetPrinter Pass