[llvm-commits] [llvm-gcc-4.2] r53457 - in /llvm-gcc-4.2/trunk/gcc/cp: cp-tree.h decl2.c lex.c pt.c
Chris Lattner
sabre at nondot.org
Fri Jul 11 09:50:14 PDT 2008
Author: lattner
Date: Fri Jul 11 11:50:12 2008
New Revision: 53457
URL: http://llvm.org/viewvc/llvm-project?rev=53457&view=rev
Log:
Revert Rafael's patch for now, which is GPL3.
Modified:
llvm-gcc-4.2/trunk/gcc/cp/cp-tree.h
llvm-gcc-4.2/trunk/gcc/cp/decl2.c
llvm-gcc-4.2/trunk/gcc/cp/lex.c
llvm-gcc-4.2/trunk/gcc/cp/pt.c
Modified: llvm-gcc-4.2/trunk/gcc/cp/cp-tree.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/cp-tree.h?rev=53457&r1=53456&r2=53457&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/cp-tree.h (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/cp-tree.h Fri Jul 11 11:50:12 2008
@@ -4122,7 +4122,6 @@
extern void yyhook (int);
extern bool cxx_init (void);
extern void cxx_finish (void);
-extern bool in_main_input_context (void);
/* in method.c */
extern void init_method (void);
@@ -4205,7 +4204,6 @@
extern bool reregister_specialization (tree, tree, tree);
extern tree fold_non_dependent_expr (tree);
extern bool explicit_class_specialization_p (tree);
-extern tree outermost_tinst_level (void);
/* in repo.c */
extern void init_repo (void);
Modified: llvm-gcc-4.2/trunk/gcc/cp/decl2.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/decl2.c?rev=53457&r1=53456&r2=53457&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/decl2.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/decl2.c Fri Jul 11 11:50:12 2008
@@ -1879,12 +1879,9 @@
int subvis = type_visibility (ftype);
if (subvis == VISIBILITY_ANON)
- {
- if (!in_main_input_context ())
- warning (0, "\
+ warning (0, "\
%qT has a field %qD whose type uses the anonymous namespace",
type, t);
- }
else if (IS_AGGR_TYPE (ftype)
&& vis < VISIBILITY_HIDDEN
&& subvis >= VISIBILITY_HIDDEN)
@@ -1899,12 +1896,9 @@
int subvis = type_visibility (TREE_TYPE (t));
if (subvis == VISIBILITY_ANON)
- {
- if (!in_main_input_context())
- warning (0, "\
+ warning (0, "\
%qT has a base %qT whose type uses the anonymous namespace",
type, TREE_TYPE (t));
- }
else if (vis < VISIBILITY_HIDDEN
&& subvis >= VISIBILITY_HIDDEN)
warning (OPT_Wattributes, "\
Modified: llvm-gcc-4.2/trunk/gcc/cp/lex.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/lex.c?rev=53457&r1=53456&r2=53457&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/lex.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/lex.c Fri Jul 11 11:50:12 2008
@@ -877,18 +877,3 @@
return t;
}
-
-/* Returns true if we are currently in the main source file, or in a
- template instantiation started from the main source file. */
-
-bool
-in_main_input_context (void)
-{
- tree tl = outermost_tinst_level();
-
- if (tl)
- return strcmp (main_input_filename,
- LOCATION_FILE (TINST_LOCATION (tl))) == 0;
- else
- return strcmp (main_input_filename, input_filename) == 0;
-}
Modified: llvm-gcc-4.2/trunk/gcc/cp/pt.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/pt.c?rev=53457&r1=53456&r2=53457&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/pt.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/pt.c Fri Jul 11 11:50:12 2008
@@ -5288,15 +5288,6 @@
pop_tinst_level ();
}
-/* Returns the TINST_LEVEL which gives the original instantiation
- context. */
-
-tree
-outermost_tinst_level (void)
-{
- return tree_last (current_tinst_level);
-}
-
/* DECL is a friend FUNCTION_DECL or TEMPLATE_DECL. ARGS is the
vector of template arguments, as for tsubst.
More information about the llvm-commits
mailing list