[llvm-branch-commits] [cfe-tag] r95835 - in /cfe/tags/cremebrulee/cremebrulee-36.3/lib: Frontend/PCHReader.cpp Sema/SemaDeclObjC.cpp

Ted Kremenek kremenek at apple.com
Wed Feb 10 16:57:43 PST 2010


Author: kremenek
Date: Wed Feb 10 18:57:43 2010
New Revision: 95835

URL: http://llvm.org/viewvc/llvm-project?rev=95835&view=rev
Log:
Merge in r95834.

Modified:
    cfe/tags/cremebrulee/cremebrulee-36.3/lib/Frontend/PCHReader.cpp
    cfe/tags/cremebrulee/cremebrulee-36.3/lib/Sema/SemaDeclObjC.cpp

Modified: cfe/tags/cremebrulee/cremebrulee-36.3/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/tags/cremebrulee/cremebrulee-36.3/lib/Frontend/PCHReader.cpp?rev=95835&r1=95834&r2=95835&view=diff

==============================================================================
--- cfe/tags/cremebrulee/cremebrulee-36.3/lib/Frontend/PCHReader.cpp (original)
+++ cfe/tags/cremebrulee/cremebrulee-36.3/lib/Frontend/PCHReader.cpp Wed Feb 10 18:57:43 2010
@@ -434,7 +434,9 @@
         continue;
       }
 
-      Prev->Next = new ObjCMethodList(Method, 0);
+      ObjCMethodList *Mem =
+        Reader.getSema()->BumpAlloc.Allocate<ObjCMethodList>();
+      Prev->Next = new (Mem) ObjCMethodList(Method, 0);
       Prev = Prev->Next;
     }
 
@@ -450,7 +452,9 @@
         continue;
       }
 
-      Prev->Next = new ObjCMethodList(Method, 0);
+      ObjCMethodList *Mem =
+        Reader.getSema()->BumpAlloc.Allocate<ObjCMethodList>();
+      Prev->Next = new (Mem) ObjCMethodList(Method, 0);
       Prev = Prev->Next;
     }
 

Modified: cfe/tags/cremebrulee/cremebrulee-36.3/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/tags/cremebrulee/cremebrulee-36.3/lib/Sema/SemaDeclObjC.cpp?rev=95835&r1=95834&r2=95835&view=diff

==============================================================================
--- cfe/tags/cremebrulee/cremebrulee-36.3/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/tags/cremebrulee/cremebrulee-36.3/lib/Sema/SemaDeclObjC.cpp Wed Feb 10 18:57:43 2010
@@ -1443,7 +1443,8 @@
 
   // We have a new signature for an existing method - add it.
   // This is extremely rare. Only 1% of Cocoa selectors are "overloaded".
-  Entry.Next = new ObjCMethodList(Method, Entry.Next);
+  ObjCMethodList *Mem = BumpAlloc.Allocate<ObjCMethodList>();
+  Entry.Next = new (Mem) ObjCMethodList(Method, Entry.Next);
 }
 
 // FIXME: Finish implementing -Wno-strict-selector-match.
@@ -1506,7 +1507,8 @@
     if (!match) {
       // We have a new signature for an existing method - add it.
       // This is extremely rare. Only 1% of Cocoa selectors are "overloaded".
-      struct ObjCMethodList *OMI = new ObjCMethodList(Method, FirstMethod.Next);
+      ObjCMethodList *Mem = BumpAlloc.Allocate<ObjCMethodList>();
+      ObjCMethodList *OMI = new (Mem) ObjCMethodList(Method, FirstMethod.Next);
       FirstMethod.Next = OMI;
     }
   }





More information about the llvm-branch-commits mailing list