From efa57feec8e47a9f6e4b62a21658f614b4aeb7d5 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 25 Aug 2018 09:11:47 +0000 Subject: [PATCH] Code clean-up on darwin.c * config/darwin.c (machopic_legitimize_pic_address): Clean up extraneous parentheses, dead code section and formatting. From-SVN: r263851 --- gcc/ChangeLog | 5 +++++ gcc/config/darwin.c | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7bda57573d2..1816d48528c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-08-25 Iain Sandoe + + * config/darwin.c (machopic_legitimize_pic_address): Clean up + extraneous parentheses, dead code section and formatting. + 2018-08-24 David Malcolm PR 87091 diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 233076a3b77..aa2ef91c64a 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -824,8 +824,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) /* First handle a simple SYMBOL_REF or LABEL_REF */ if (GET_CODE (orig) == LABEL_REF - || (GET_CODE (orig) == SYMBOL_REF - )) + || GET_CODE (orig) == SYMBOL_REF) { /* addr(foo) = &func+(foo-func) */ orig = machopic_indirect_data_reference (orig, reg); @@ -1024,10 +1023,6 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) return pic_ref; } } - - else if (GET_CODE (orig) == SYMBOL_REF) - return orig; - else if (GET_CODE (orig) == PLUS && (GET_CODE (XEXP (orig, 0)) == MEM || GET_CODE (XEXP (orig, 0)) == SYMBOL_REF @@ -1057,12 +1052,10 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg) } /* Likewise, should we set special REG_NOTEs here? */ } - else if (GET_CODE (orig) == CONST) { return machopic_legitimize_pic_address (XEXP (orig, 0), Pmode, reg); } - else if (GET_CODE (orig) == MEM && GET_CODE (XEXP (orig, 0)) == SYMBOL_REF) { -- 2.30.2