[PATCH] Check Compile Flow Consistency tool (check_cfc.py)

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Apr 1 07:43:34 PDT 2015


================
Comment at: utils/check_cfc/check_cfc.py:87
@@ +86,3 @@
+    pathlist = path_var.split(os.pathsep)
+    pathlist = [a for a in pathlist if os.path.normpath(os.path.normcase(a)) != os.path.normpath(os.path.normcase(directory))]
+    return os.pathsep.join(pathlist)
----------------
Would it be more idiomatic to use filter?


================
Comment at: utils/check_cfc/check_cfc.py:105
@@ +104,3 @@
+
+def is_output_specified(args):
+    """Return true is output file is specified in args."""
----------------
This is just get_output_file != None, no?

================
Comment at: utils/check_cfc/check_cfc.py:250
@@ +249,3 @@
+        # Compare disassembly (returns first diff if differs)
+        difference = obj_diff.compare_object_files(self._output_file_a, output_file_b)
+        if difference:
----------------
This could be a bit more strict. For example, data sections should also not change.

How about comparing all sections that are present in both files?


================
Comment at: utils/check_cfc/check_cfc.py:267
@@ +266,3 @@
+        # Compare disassembly (returns first diff if differs)
+        difference = obj_diff.compare_object_files(self._output_file_a, output_file_b)
+        if difference:
----------------
You can be more strict in here. The two objects should be byte by byte identical.

http://reviews.llvm.org/D8723

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list