From ea68a69f8ba338a82c491a7883491742e549d62f Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 19 Oct 2017 16:16:27 -0700 Subject: [PATCH] Fix a flake8 lint. Also don't infer writes_cpu_flags if it is specified explicitly. --- lib/cretonne/meta/cdsl/instructions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cretonne/meta/cdsl/instructions.py b/lib/cretonne/meta/cdsl/instructions.py index 8c66b400fb..2ca4951c58 100644 --- a/lib/cretonne/meta/cdsl/instructions.py +++ b/lib/cretonne/meta/cdsl/instructions.py @@ -147,7 +147,9 @@ class Instruction(object): setattr(self, attr, not not kwargs.get(attr, False)) # Infer the 'writes_cpu_flags' field value. - setattr(self, 'writes_cpu_flags', any(out.is_cpu_flags() for out in self.outs)) + if 'writes_cpu_flags' not in kwargs: + self.writes_cpu_flags = any( + out.is_cpu_flags() for out in self.outs) InstructionGroup.append(self)