Lines beginning with #ifdef, #else, #endif were not incrementing
the line number, resulting in bad line number information for
assembly files with #ifdefs.
Example:
#ifndef GOARCH_ppc64
#endif
#ifdef GOARCH_ppc64le
#endif
TEXT ·use(SB),7,$0
RET
Before this change, the line number recorded for use in 6a -S output
(and in the runtime information in the binary) was 4 too low.
Change-Id: I23e599112ec9919f72e53ac82d9bebbbae3439ed
Reviewed-on: https://go-review.googlesource.com/3783
Reviewed-by: Rob Pike <r@golang.org>
c = peekc;
if(c != IGN) {
peekc = IGN;
+ if(c == '\n')
+ lineno++;
return c;
}
c = GETC();
return l;
}
}
- peekc = c;
+ unget(c);
return l;
}
switch(c)
c = peekc
if c != IGN {
peekc = IGN
+ if c == '\n' {
+ Lineno++
+ }
return c
}
}
peekc = c
+ unget(c)
return l
}