[PATCH] D19094: Nuke getGlobalContext() from LLVM (but the C API)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 18 11:58:55 PDT 2016
Tried to clean it in r266652 by removing global variables in lli.
Thanks for the notification!
--
Mehdi
> On Apr 17, 2016, at 8:20 AM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
>
> chapuni added a subscriber: chapuni.
>
> ================
> Comment at: tools/lli/lli.cpp:388
> @@ -387,3 +387,3 @@
>
> - LLVMContext &Context = getGlobalContext();
> + LLVMContext Context;
> atexit(do_shutdown); // Call llvm_shutdown() on exit.
> ----------------
> I guess it might cause undefined behavior. See do_shutdown().
> It seems EE depends on LLVMContext and EE is alive after Context has been destroyed.
>
> Appeased in r266441, or we should do;
>
> # Make destructors in EE to be unaware of LLVMContext.
> # Don't use return in main(), but exit().
> # Make lli not to use do_shutdown().
>
>
> http://reviews.llvm.org/D19094
>
>
>
More information about the llvm-commits
mailing list