aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/gdbhelpers
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-03 10:13:58 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-11-03 21:54:22 +0100
commit63510eb0acb3babcda112adeb506c8f4f47158f1 (patch)
treebdd2cf2d2e817b980fe2da850fbe377ae95567f4 /gdbhelpers
parent1e6f6c0efc0fd3386669cfa55f8333887b8d5ea5 (diff)
downloadsparse-dev-63510eb0acb3babcda112adeb506c8f4f47158f1.tar.gz
remove unneeded MOD_TYPE
MOD_TYPE is used for the sparse extension which allow to directly compare types with each others. Expressions for direct type are EXPR_TYPE with the type in expr->symbol and the expression itself having it's type (expr->ctype) set to &type_ctype. This is one of the few base/builtin types and is the only one which can have MOD_TYPE. However, a specific modifier is not needed, the address of the symbol can simple be used (like it is done for 'bad_ctype' or 'incomplete_ctype'). Also, there is only a single place where MOD_TYPE is tested: is_type_ctype(), itself used a single time. So: * rewrite the unique test using is_type_ctype() by directly comparing with &type_ctype instead; * remove the now unused is_type_ctype(); * remove MOD_TYPE from type_ctype's definition; * remove MOD_TYPE's definition; and spare one precious bit for other modifiers. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'gdbhelpers')
-rw-r--r--gdbhelpers3
1 files changed, 0 insertions, 3 deletions
diff --git a/gdbhelpers b/gdbhelpers
index 2fe9336d..8d186cee 100644
--- a/gdbhelpers
+++ b/gdbhelpers
@@ -152,9 +152,6 @@ define gdb_show_ctype
if ($arg0->modifiers & MOD_ASSIGNED)
printf "MOD_ASSIGNED "
end
- if ($arg0->modifiers & MOD_TYPE)
- printf "MOD_TYPE "
- end
if ($arg0->modifiers & MOD_SAFE)
printf "MOD_SAFE "
end