On Jan 15, 2007, at 2:58 PM, Devang Patel wrote:

> Right now, ManagedStatics are not deleted (through llvm_shutdown) by
> llvm-gcc.
> Here is the patch.

Ahhh, right.  Yep, looks good.  Nice detective work,

-Chris

> OK to install?
> Thanks,
> -
> Devang
>
> Index: llvm-backend.cpp
> ===================================================================
> --- llvm-backend.cpp    (revision 122487)
> +++ llvm-backend.cpp    (working copy)
> @@ -45,6 +45,7 @@ Software Foundation, 59 Temple Place - S
>   #include "llvm/Transforms/IPO.h"
>   #include "llvm/ADT/StringExtras.h"
>   #include "llvm/Support/Streams.h"
> +#include "llvm/Support/ManagedStatic.h"
>   #include <cassert>
>   #undef VISIBILITY_HIDDEN
>   extern "C" {
> @@ -358,6 +359,7 @@ static void CreateStructorsList(std::vec
>   // llvm_asm_file_end - Finish the .s file.
>   void llvm_asm_file_end(void) {
>     timevar_push(TV_LLVM_PERFILE);
> +  llvm_shutdown_obj X;  // Call llvm_shutdown() on exit.
>
>     // Add an llvm.global_ctors global if needed.
>     if (!StaticCtors.empty())
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to