aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-03-15 15:02:37 +0000
committerNico Weber <nicolasweber@gmx.de>2013-03-15 15:02:37 +0000
commit7e0786f08e5e14776c8a46a0534c254b3fdc14fe (patch)
tree3609c8d6eeb8efb9cd21682284b9980d2e56dd48 /lib/AST/ASTContext.cpp
parent3af59ce065310fd3d0820a6e2644d4ca688be810 (diff)
Remove a pointless assertion.
FindNodeOrInsertPos() is called 10 lines earlier already, and the function early-returns there if the result is != 0. InsertPos isn't recomputed after that check, so this assert is always trivially true. (And it has nothing to do with if T is canonical or not.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index b55a926e32..6840726b70 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -2026,13 +2026,9 @@ 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);