# Contributed by Diego Novillo <dnovillo@google.com>
+# Prune messages from gcc that aren't useful.
+
+proc lto_prune_vis_warns { text } {
+
+ # Many tests that use visibility will still pass on platforms that don't support it.
+ regsub -all "(^|\n)\[^\n\]*: warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text
+
+ # And any stray location lines.
+ regsub -all "(^|\n)\[^\n\]*: In function \[^\n\]*" $text "" text
+ regsub -all "(^|\n)In file included from :\[^\n\]*" $text "" text
+
+ return $text
+}
# lto_init -- called at the start of each subdir of tests
# Link the objects into an executable.
set comp_output [${tool}_target_compile "$objlist" $dest executable \
"$options"]
+
+ # Prune unimportant visibility warnings before checking output.
+ set comp_output [lto_prune_vis_warns $comp_output]
+
if ![${tool}_check_compile "$testcase $testname link" "" \
$dest $comp_output] then {
unresolved "$testcase $testname execute $optstr"