[PATCH] D28150: Move the section name from GlobalObject to the LLVMContext
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 29 10:30:49 PST 2016
jlebar accepted this revision.
jlebar added inline comments.
================
Comment at: lib/IR/Globals.cpp:180
+ // context.
+ S = getContext().pImpl->SectionStrings.insert(S).first->first();
+ getContext().pImpl->GlobalObjectSections[this] = S;
----------------
mehdi_amini wrote:
> jlebar wrote:
> > Don't we "leak" section strings now? (That is, if I call setSection(x) a bunch of times on the same object, all of the unique values of x will persist in the context forever.)
> Yes: this is the common practice with the LLVMContext (Metadata, Type, Constant, ...)
Ah, okay then!
https://reviews.llvm.org/D28150
More information about the llvm-commits
mailing list