Fixing assembly coverage

We failed to correctly parse files that executed from the very start of
the file due to a missing '- line XXX'. We now use the 'Ir' indicator to
recognize the beginning of a file.

Change-Id: I529fae9458ac634bf7bf8af61ef18f080e808535
Reviewed-on: https://boringssl-review.googlesource.com/7542
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/util/generate-asm-lcov.py b/util/generate-asm-lcov.py
index 7b66070..257ae84 100755
--- a/util/generate-asm-lcov.py
+++ b/util/generate-asm-lcov.py
@@ -69,6 +69,7 @@
 
   # Lines are of the following formats:
   #   -- line: Indicates that analysis continues from a different place.
+  #   Ir     : Indicates the start of a file.
   #   =>     : Indicates a call/jump in the control flow.
   #   <Count> <Code>: Indicates that the line has been executed that many times.
   line = None
@@ -76,7 +77,9 @@
     l = l.strip() + ' '
     if l.startswith('-- line'):
       line = int(l.split(' ')[2]) - 1
-    elif line != None and '=>' not in l:
+    elif l.strip() == 'Ir':
+      line = 0
+    elif line != None and l.strip() and '=>' not in l and 'unidentified lines' not in l:
       count = l.split(' ')[0].replace(',', '').replace('.', '0')
       instruction = l.split(' ', 1)[1].strip()
       if count != '0' or is_asm(instruction):