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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177165 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bob Wilson 2013-03-15 17:12:43 +00:00
Родитель 6b6a9b3f7b
Коммит c90cc9374f
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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);