This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, Darwin] Minor code clean-up, NFC, committed.


Hi

I committed the following patch which cleans up fallout from an ancient merge of
the machopic stuff.  No functional change intended.

2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>

gcc/

	* config/darwin.c (machopic_legitimize_pic_address): Clean up
	extraneous parentheses, dead code section and formatting.

Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c	(revision 263850)
+++ gcc/config/darwin.c	(revision 263851)
@@ -824,8 +824,7 @@ machopic_legitimize_pic_address (rtx orig, machine
 
   /* 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
           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
 	}
       /* 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)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]