Trivial code cleanup in ir_dereference::is_lvalue
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 29 Mar 2010 19:52:00 +0000 (12:52 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 29 Mar 2010 19:52:00 +0000 (12:52 -0700)
ir.h

diff --git a/ir.h b/ir.h
index 3ef37083697fca2ad143c87052c197ce0100bad5..328cd4e4ff532c9b7819b6d4debb859d0ad734dc 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -458,15 +458,12 @@ public:
 
    bool is_lvalue()
    {
-      ir_variable *as_var;
-
       if (var == NULL)
-        return NULL;
-
-      as_var = var->as_variable();
+        return false;
 
+      ir_variable *const as_var = var->as_variable();
       if (as_var == NULL)
-        return NULL;
+        return false;
 
       return !as_var->read_only;
    }