[lld] r289084 - Move Memory.{h, cpp} to lld/Support so that we can use them from COFF.
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 15:19:04 PST 2016
Unless I'm reading the code in the diff wrong (or misunderstanding something else), BAlloc, Saver, and Instances are namespace-level globals. That means they have global static initializers.
-Chris
> On Dec 12, 2016, at 3:15 PM, Rafael Avila de Espindola <rafael.espindola at gmail.com> wrote:
>
> Chris Bieneman via llvm-commits <llvm-commits at lists.llvm.org> writes:
>
>> Can we maybe wrap the globals from Memory.cpp either in a singleton pattern with access functions (preferred) or ManagedStatics?
>>
>> Avoiding the static initialization cost is desirable for both libraries and tools.
>
> They are already static locals, no?
>
> Cheers,
> Rafael
More information about the llvm-commits
mailing list