[cfe-commits] [PATCH] Simplify StringSwitch
Chris Lattner
clattner at apple.com
Fri Dec 4 15:15:31 PST 2009
On Dec 3, 2009, at 3:53 AM, Gabor Greif wrote:
> Hi all,
>
> attached patch simplifies StringSwitch and gets rid of the
> Copy{Constructible|Assignable} constraint on the type parameter.
>
> It should also be a bit more efficient, in runtime and space.
>
> I know that several PRs are open against LLVM optimizations
> that focus on this construct, so I did not commit this directly.
I don't have an opinion of the correctness of this change, but feel
free to not worry about a minor tweak that will break llvm
efficiency. Write reasonable code and expect the optimizer people to
fix it for you.
Just don't call .end() every time through a loop unless you need
to. ;-)
-Chris
More information about the cfe-commits
mailing list