[trans-mem] constify is_tm_{pure,safe}
diff mbox

Message ID 4D0753FA.80003@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Dec. 14, 2010, 11:24 a.m. UTC
I keep forgetting we can now bootstrap... errr, have been able to do it 
for a year.

A full bootstrap found some const warnings.  Fixed and committed as obvious.
* tree.h (is_tm_safe): Constify.
	(is_tm_pure): Same.
	* trans-mem.c (get_attrs_for): Same.
	(is_tm_pure): Same.
	(is_tm_safe): Same.

diff mbox

Index: tree.h
--- tree.h	(revision 167791)
+++ tree.h	(working copy)
@@ -5388,8 +5388,8 @@  extern tree build_personality_function (
 /* In trans-mem.c.  */
 extern tree build_tm_abort_call (location_t, bool);
-extern bool is_tm_safe (tree);
-extern bool is_tm_pure (tree);
+extern bool is_tm_safe (const_tree);
+extern bool is_tm_pure (const_tree);
 extern bool is_tm_may_cancel_outer (tree);
 extern void record_tm_replacement (tree, tree);
 extern void tm_malloc_replacement (tree);
Index: trans-mem.c
--- trans-mem.c	(revision 167791)
+++ trans-mem.c	(working copy)
@@ -143,7 +143,7 @@ 
    to function types and function decls and peek through.  */
 static tree
-get_attrs_for (tree x)
+get_attrs_for (const_tree x)
   switch (TREE_CODE (x))
@@ -174,7 +174,7 @@  get_attrs_for (tree x)
 /* Return true if X has been marked TM_PURE.  */
-is_tm_pure (tree x)
+is_tm_pure (const_tree x)
   tree attrs = get_attrs_for (x);
   if (attrs)
@@ -207,7 +207,7 @@  is_tm_irrevocable (tree x)
 /* Return true if X has been marked TM_SAFE.  */
-is_tm_safe (tree x)
+is_tm_safe (const_tree x)
   tree attrs = get_attrs_for (x);