[PATCH] D15195: PR4941: Add support for -fno-builtin-foo options.
Hal Finkel via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 14 14:54:37 PST 2015
hfinkel added a comment.
In http://reviews.llvm.org/D15195#310395, @mcrosier wrote:
> In http://reviews.llvm.org/D15195#307136, @hfinkel wrote:
>
> > Can you use a StringSet instead of a vector and avoid all (most) of the code iterating over the vector of builtins being disabled?
>
>
> Hi Hal,
> I began converting the code to use StringSets, but I soon realized this wasn't as trivial of a change as one would hope. There are number of places where the LangOptions and CodeGenOptions are copied (e.g., Lexer.cpp:133, PrettyPrinter.h:38, ModuleBuilder.cpp:66) . Unfortunately, this copying requires a copy constructor for the StringSets. I'd prefer to stick with a simple string vector as any code saved by not iterating over the vector is lost on the copy constructor implementation. FWIW, I also don't believe this to be performance critical code.. Please let me know your thoughts.
In that case, let's stick with the vector for now. We can always improve things later if we'd like.
http://reviews.llvm.org/D15195
More information about the cfe-commits
mailing list