]>
Commit | Line | Data |
---|---|---|
748086b7 JJ |
1 | # Copyright (C) 1997, 1999, 2000, 2001, 2004, 2009 |
2 | # Free Software Foundation, Inc. | |
9e78e45a DB |
3 | |
4 | # This program is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
748086b7 | 6 | # the Free Software Foundation; either version 3 of the License, or |
9e78e45a DB |
7 | # (at your option) any later version. |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
748086b7 JJ |
15 | # along with this program; see the file COPYING3. If not see |
16 | # <http://www.gnu.org/licenses/>. | |
9e78e45a DB |
17 | |
18 | # Prune messages from g++ that aren't useful. | |
19 | ||
a40cc81f JM |
20 | # Prune any messages matching ARGS[1] (a regexp) from test output. |
21 | proc dg-prune-output { args } { | |
22 | global additional_prunes | |
23 | ||
24 | if { [llength $args] != 2 } { | |
25 | error "[lindex $args 1]: need one argument" | |
26 | return | |
27 | } | |
28 | ||
29 | lappend additional_prunes [lindex $args 1] | |
30 | } | |
31 | ||
32 | proc libstdc++-dg-prune { system text } { | |
33 | global additional_prunes | |
9e78e45a DB |
34 | |
35 | # Cygwin warns about -ffunction-sections | |
dd37368c | 36 | regsub -all "(^|\n)\[^\n\]*: -ffunction-sections may affect debugging on some targets\[^\n\]*" $text "" text |
9e78e45a | 37 | |
ab10a269 DB |
38 | # Remove parts of warnings that refer to location of previous |
39 | # definitions, etc as these confuse dejagnu | |
a40cc81f JM |
40 | regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data)\[^\n\]*" $text "" text |
41 | regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text | |
3ff60975 | 42 | regsub -all "(^|\n)\[^\n\]*: (recursively )?required \[^\n\]*" $text "" text |
a40cc81f JM |
43 | regsub -all "(^|\n)\[^\n\]*: . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text |
44 | regsub -all "(^|\n) inlined from \[^\n\]*" $text "" text | |
45 | # Why doesn't GCC need these to strip header context? | |
46 | regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text | |
47 | regsub -all "(^|\n)\[ \t\]*from \[^\n\]*" $text "" text | |
ab10a269 | 48 | |
d62c1a1f AS |
49 | # Ignore errata warning from IA64 assembler. |
50 | regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text | |
51 | regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text | |
52 | ||
082b966f JH |
53 | # Ignore harmless warnings from Xcode 3.2.x. |
54 | regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text | |
55 | regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text | |
56 | regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text | |
57 | ||
5513ecd5 JH |
58 | # Ignore harmless warnings from Xcode 4.0. |
59 | regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text | |
60 | ||
a40cc81f JM |
61 | foreach p $additional_prunes { |
62 | if { [string length $p] > 0 } { | |
63 | # Following regexp matches a complete line containing $p. | |
64 | regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text | |
65 | } | |
66 | } | |
67 | ||
9e78e45a DB |
68 | return $text |
69 | } |