r177165 - Revert "Remove a pointless assertion."
Bob Wilson
bob.wilson at apple.com
Fri Mar 15 10:12:43 PDT 2013
Author: bwilson
Date: Fri Mar 15 12:12:43 2013
New Revision: 177165
URL: http://llvm.org/viewvc/llvm-project?rev=177165&view=rev
Log:
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.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=177165&r1=177164&r2=177165&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Fri Mar 15 12:12:43 2013
@@ -2026,9 +2026,13 @@ QualType ASTContext::getPointerType(Qual
// 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);
More information about the cfe-commits
mailing list