aboutsummaryrefslogtreecommitdiff
path: root/gold/workqueue-threads.cc
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2014-08-14 13:36:24 -0700
committerJoel Brobecker <brobecker@adacore.com>2014-08-18 17:09:33 +0200
commitda5c522f5be478d020c14038ace2ba2ee2b9e032 (patch)
tree57f31c2f61bf4dea0ed37f3626751a1185e62a20 /gold/workqueue-threads.cc
parent0d72a7c318b83384973583323f8c7d54bf1bbffa (diff)
downloadgdb-da5c522f5be478d020c14038ace2ba2ee2b9e032.zip
gdb-da5c522f5be478d020c14038ace2ba2ee2b9e032.tar.gz
gdb-da5c522f5be478d020c14038ace2ba2ee2b9e032.tar.bz2
avoid "if ... else if ... else" logic in ada-lang.c::ada_evaluate_subexp
The OP_VAR_VALUE branch in ada_evaluate_subexp is written with multiple "if ... else if ... else if ... else ..." block. But in practice, these blocks all either goto out of that block of code, or return. This patch rewrites this code slightly by replacing the "else if"-s by simple "if"s. This should better reflect the ideal processing where we try to do a standard eval whenever possible, and only do something else when the standard eval does not work. On a pratical level, this patch makes it easier to fall through to the default processing when none of the special situations are detected, thus making it easier to add more handlers of those special situations; or to remove them as they no longer become necessary! gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp) <OP_VAR_VALUE>: Slight code rewrite to avoid "else if" and "else" constructs. Should be a no-op in practice.
Diffstat (limited to 'gold/workqueue-threads.cc')
0 files changed, 0 insertions, 0 deletions