]> Cypherpunks repositories - gostls13.git/commit
[dev.cc] cmd/6a, etc: fix line number accounting during #ifdef
authorRuss Cox <rsc@golang.org>
Tue, 3 Feb 2015 16:48:50 +0000 (11:48 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 3 Feb 2015 17:41:25 +0000 (17:41 +0000)
commit975c82fd9b58b5ff4cab4fff2327308e1fcaf427
tree87b727d585b558fbd850c4ccaac80129521ef370
parent68475da68d8884ee6b8d7b1d846ed9e3c6477a20
[dev.cc] cmd/6a, etc: fix line number accounting during #ifdef

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>
src/cmd/cc/lexbody
src/cmd/internal/asm/lexbody.go