[llvm-commits] CVS: llvm-gcc/gcc/langhooks-def.h c-common.c c-common.h

Chris Lattner lattner at cs.uiuc.edu
Mon Feb 14 13:24:45 PST 2005



Changes in directory llvm-gcc/gcc:

langhooks-def.h updated: 1.3 -> 1.4
c-common.c updated: 1.7 -> 1.8
c-common.h updated: 1.3 -> 1.4
---
Log message:

staticp returns a tree now


---
Diffs of the changes:  (+5 -5)

 c-common.c      |    6 +++---
 c-common.h      |    2 +-
 langhooks-def.h |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm-gcc/gcc/langhooks-def.h
diff -u llvm-gcc/gcc/langhooks-def.h:1.3 llvm-gcc/gcc/langhooks-def.h:1.4
--- llvm-gcc/gcc/langhooks-def.h:1.3	Thu Feb  5 10:05:45 2004
+++ llvm-gcc/gcc/langhooks-def.h	Mon Feb 14 15:24:32 2005
@@ -55,7 +55,7 @@
 extern tree lhd_return_null_tree (tree);
 extern tree lhd_do_nothing_iii_return_null_tree (int, int, int);
 extern int lhd_safe_from_p (rtx, tree);
-extern int lhd_staticp (tree);
+extern tree lhd_staticp (tree);
 extern int lhd_unsafe_for_reeval (tree);
 extern void lhd_clear_binding_stack (void);
 extern void lhd_print_tree_nothing (FILE *, tree, int);


Index: llvm-gcc/gcc/c-common.c
diff -u llvm-gcc/gcc/c-common.c:1.7 llvm-gcc/gcc/c-common.c:1.8
--- llvm-gcc/gcc/c-common.c:1.7	Sun Feb 13 21:22:04 2005
+++ llvm-gcc/gcc/c-common.c	Mon Feb 14 15:24:32 2005
@@ -4196,13 +4196,13 @@
 
 /* Hook used by staticp to handle language-specific tree codes.  */
 
-int
+tree
 c_staticp (tree exp)
 {
   if (TREE_CODE (exp) == COMPOUND_LITERAL_EXPR
       && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
-    return 1;
-  return 0;
+    return exp;
+  return NULL;
 }
 
 


Index: llvm-gcc/gcc/c-common.h
diff -u llvm-gcc/gcc/c-common.h:1.3 llvm-gcc/gcc/c-common.h:1.4
--- llvm-gcc/gcc/c-common.h:1.3	Thu Feb  5 10:05:44 2004
+++ llvm-gcc/gcc/c-common.h	Mon Feb 14 15:24:32 2005
@@ -1280,7 +1280,7 @@
 
 extern int c_safe_from_p (rtx, tree);
 
-extern int c_staticp (tree);
+extern tree c_staticp (tree);
 
 extern int c_common_unsafe_for_reeval (tree);
 






More information about the llvm-commits mailing list