[cfe-dev] Targets.cpp in clangDriver MSVC project missing and other issues
Wilhansen Li
willi.t1 at gmail.com
Thu Jan 3 05:31:08 PST 2008
Hi,
I tried doing as what you've said and the same problem/limitation
still exists with the same number of chains/nests.
On 1/2/08, Anton Korobeynikov <asl at math.spbu.ru> wrote:
> Hello, Wilhansen (I'm sorry if I swapped your name/surname).
>
> > After investigating the problem, the main culprit seems to be the
> > compiler itself. You can't have more than 124~ if/else if chains. It
> > seems that the compiler translates
> Exactly. The first variant will reduce the number of else-if chains
> dramatically by emitting a "tree" of comparisons. However, I suspect,
> this won't be enough. Could you please investigate the following behavior:
>
> if (a) {
> foo();
> if (a1) {
> bar();
> if (a11) {
> } else if (a12) {
> }
> } else if (a2) {
> } ...
> } else if (b) {
> ...
> } else if (c) {
> ...
>
> I'm planning to add quick first check on string length later, thus
> splitting such tree into "forest" of smaller ones.
>
> --
> WBR, Anton Korobeynikov
>
--
(<_<)(>_>)(>_<)(<.<)(>.>)(>.<)
Life is too short for dial-up.
More information about the cfe-dev
mailing list