[cfe-commits] r108198 - /cfe/trunk/lib/Frontend/PCHReaderDecl.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Jul 12 14:41:31 PDT 2010


Author: akirtzidis
Date: Mon Jul 12 16:41:31 2010
New Revision: 108198

URL: http://llvm.org/viewvc/llvm-project?rev=108198&view=rev
Log:
Simplify code using the new FoldingSetImpl::InsertNode() overload.

Modified:
    cfe/trunk/lib/Frontend/PCHReaderDecl.cpp

Modified: cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderDecl.cpp?rev=108198&r1=108197&r2=108198&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReaderDecl.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReaderDecl.cpp Mon Jul 12 16:41:31 2010
@@ -929,15 +929,9 @@
                        = cast<ClassTemplateDecl>(Reader.GetDecl(Record[Idx++]));
     if (ClassTemplatePartialSpecializationDecl *Partial
             = dyn_cast<ClassTemplatePartialSpecializationDecl>(D)) {
-      ClassTemplatePartialSpecializationDecl *Inserted
-          = CanonPattern->getPartialSpecializations().GetOrInsertNode(Partial);
-      (void)Inserted;
-      assert(Inserted == Partial && "Already inserted!");
+      CanonPattern->getPartialSpecializations().InsertNode(Partial);
     } else {
-      ClassTemplateSpecializationDecl *Inserted
-          = CanonPattern->getSpecializations().GetOrInsertNode(D);
-      (void)Inserted;
-      assert(Inserted == D && "Already inserted!");
+      CanonPattern->getSpecializations().InsertNode(D);
     }
   }
 }





More information about the cfe-commits mailing list