diff options
author | Bob Wilson <bob.wilson@apple.com> | 2013-03-15 17:12:43 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2013-03-15 17:12:43 +0000 |
commit | c8541f2bf21c33a567d8dcaf163bc6071311fd58 (patch) | |
tree | 2cd3700a83f8ab7bdf1c17e50b00afa4212e17ea | |
parent | 5acf8a3ac5b7e1e6542716400f6c6e93615462c9 (diff) | |
download | bcm5719-llvm-c8541f2bf21c33a567d8dcaf163bc6071311fd58.tar.gz bcm5719-llvm-c8541f2bf21c33a567d8dcaf163bc6071311fd58.zip |
Revert "Remove a pointless assertion."
This reverts commit r177158.
I'm blindly reverting this because it appears to be breaking numerous
buildbots. I'll reapply if it doesn't turn out to be the culprit.
llvm-svn: 177165
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 6840726b70a..b55a926e32a 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -2026,9 +2026,13 @@ QualType ASTContext::getPointerType(QualType T) const { // If the pointee type isn't canonical, this won't be a canonical type either, // so fill in the canonical type field. QualType Canonical; - if (!T.isCanonical()) + if (!T.isCanonical()) { Canonical = getPointerType(getCanonicalType(T)); + // Get the new insert position for the node we care about. + PointerType *NewIP = PointerTypes.FindNodeOrInsertPos(ID, InsertPos); + assert(NewIP == 0 && "Shouldn't be in the map!"); (void)NewIP; + } PointerType *New = new (*this, TypeAlignment) PointerType(T, Canonical); Types.push_back(New); PointerTypes.InsertNode(New, InsertPos); |