[llvm-commits] [poolalloc] r117014 - /poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp

John Criswell criswell at uiuc.edu
Thu Oct 21 07:57:55 PDT 2010


Author: criswell
Date: Thu Oct 21 09:57:55 2010
New Revision: 117014

URL: http://llvm.org/viewvc/llvm-project?rev=117014&view=rev
Log:
Have the initializer that intializes pools run first.

Modified:
    poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp

Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=117014&r1=117013&r2=117014&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Thu Oct 21 09:57:55 2010
@@ -149,6 +149,7 @@
   // order).
   //
   std::vector<Constant *> CurrentCtors;
+  CurrentCtors.push_back (RuntimeCtorInit);
   GlobalVariable * GVCtor = M.getNamedGlobal ("llvm.global_ctors");
   if (GVCtor) {
     if (Constant * C = GVCtor->getInitializer()) {
@@ -163,7 +164,6 @@
     //
     GVCtor->setName ("removed");
   }
-  CurrentCtors.push_back (RuntimeCtorInit);
 
   //
   // Create a new initializer.





More information about the llvm-commits mailing list