aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-07-20 05:07:08 -0700
committerNathan Sidwell <nathan@acm.org>2020-07-20 05:11:19 -0700
commita926eeedf43512b8576855c0afa51ec29662fd5a (patch)
treec331fe0c8bd9c20885686db3ac5da59b6e5202f1 /gcc/expr.c
parente4f1cbc35b1e823a0a6e58eeca61c8c6ca351875 (diff)
downloadgcc-a926eeedf43512b8576855c0afa51ec29662fd5a.zip
gcc-a926eeedf43512b8576855c0afa51ec29662fd5a.tar.gz
gcc-a926eeedf43512b8576855c0afa51ec29662fd5a.tar.bz2
preprocessor: line-map cleanups
I found the linemap logic dealing with running out of column numbers confusing. There's no need for completely separate code blocks there, as we can rely on the masking operations working all the way down to zero bits. The two binary searches for linemap lookups could do with modernization of placing the var decls at their initialization point. (These two searches work in opposite directions, and while lower_bound would work there, the caching got in the way and I decided to be conservative.) libcpp/ * line-map.c (linemap_add): Simplify column overflow calculation. Add comment about range and column bit init. (linemap_ordinary_map_lookup): Refactor for RAII (linemap_macro_map_lookup): Likewise.
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions