]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/jit/jit-recording.c
* read-rtl.c (parse_reg_note_name): Replace Yoda conditions with
[thirdparty/gcc.git] / gcc / jit / jit-recording.c
index fb492c09142ffbfd511a8a7b57ee6d18b28eb204..f2cfcfd50febdd3c17a24f581acdf007c8f84ea0 100644 (file)
@@ -2987,7 +2987,7 @@ recording::compound_type::set_fields (location *loc,
                                      field **field_array)
 {
   m_loc = loc;
-  gcc_assert (NULL == m_fields);
+  gcc_assert (m_fields == NULL);
 
   m_fields = new fields (this, num_fields, field_array);
   m_ctxt->record (m_fields);
@@ -3182,7 +3182,7 @@ void
 recording::fields::write_reproducer (reproducer &r)
 {
   if (m_struct_or_union)
-    if (NULL == m_struct_or_union->dyn_cast_struct ())
+    if (m_struct_or_union->dyn_cast_struct () == NULL)
       /* We have a union; the fields have already been written by
         union::write_reproducer.  */
       return;
@@ -3370,7 +3370,7 @@ void
 recording::rvalue::set_scope (function *scope)
 {
   gcc_assert (scope);
-  gcc_assert (NULL == m_scope);
+  gcc_assert (m_scope == NULL);
   m_scope = scope;
 }
 
@@ -3750,7 +3750,7 @@ recording::function::validate ()
   /* Complain about empty functions with non-void return type.  */
   if (m_kind != GCC_JIT_FUNCTION_IMPORTED
       && m_return_type != m_ctxt->get_type (GCC_JIT_TYPE_VOID))
-    if (0 == m_blocks.length ())
+    if (m_blocks.length () == 0)
       m_ctxt->add_error (m_loc,
                         "function %s returns non-void (type: %s)"
                         " but has no blocks",
@@ -3771,7 +3771,7 @@ recording::function::validate ()
   /* Check that all blocks are reachable.  */
   if (!m_ctxt->get_inner_bool_option
         (INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS)
-      && m_blocks.length () > 0 && 0 == num_invalid_blocks)
+      && m_blocks.length () > 0 && num_invalid_blocks == 0)
     {
       /* Iteratively walk the graph of blocks, marking their "m_is_reachable"
         flag, starting at the initial block.  */