aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-03-26 09:47:36 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-03-26 09:47:36 +0000
commit3a2700f61bd54868e8572b18f3dadf994adb45ea (patch)
tree886b6b240ed0027924e198b7aaa6ec42600d5c45 /gcc/tree-pretty-print.c
parent9e1c8fc1a54927723c8c67c87d0d29b205128dd4 (diff)
downloadgcc-3a2700f61bd54868e8572b18f3dadf994adb45ea.zip
gcc-3a2700f61bd54868e8572b18f3dadf994adb45ea.tar.gz
gcc-3a2700f61bd54868e8572b18f3dadf994adb45ea.tar.bz2
tree-pretty-print.c (percent_K_format): Implement special case for LTO and its stripped down BLOCK tree.
2014-03-26 Richard Biener <rguenther@suse.de> * tree-pretty-print.c (percent_K_format): Implement special case for LTO and its stripped down BLOCK tree. From-SVN: r208843
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index 7ec4223..77446c5 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -3365,6 +3365,25 @@ percent_K_format (text_info *text)
gcc_assert (pp_ti_abstract_origin (text) != NULL);
block = TREE_BLOCK (t);
*pp_ti_abstract_origin (text) = NULL;
+
+ if (in_lto_p)
+ {
+ /* ??? LTO drops all BLOCK_ABSTRACT_ORIGINs apart from those
+ representing the outermost block of an inlined function.
+ So walk the BLOCK tree until we hit such a scope. */
+ while (block
+ && TREE_CODE (block) == BLOCK)
+ {
+ if (inlined_function_outer_scope_p (block))
+ {
+ *pp_ti_abstract_origin (text) = block;
+ break;
+ }
+ block = BLOCK_SUPERCONTEXT (block);
+ }
+ return;
+ }
+
while (block
&& TREE_CODE (block) == BLOCK
&& BLOCK_ABSTRACT_ORIGIN (block))