Update checks to allow 0 for line numbers am: bf3186be38 am: 326f7a7c11 am: 8fc979c5fd

Original change: https://android-review.googlesource.com/c/platform/tools/dexter/+/2815574

Change-Id: Ie169d85cc82d84bc9fbfce3b67d1f116a0894036
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/slicer/code_ir.cc b/slicer/code_ir.cc
index e92bc7c..6b870db 100644
--- a/slicer/code_ir.cc
+++ b/slicer/code_ir.cc
@@ -155,7 +155,7 @@
       case dex::DBG_ADVANCE_LINE:
         // line_diff
         line += dex::ReadSLeb128(&ptr);
-        SLICER_WEAK_CHECK(line > 0);
+        SLICER_WEAK_CHECK(line >= 0);
         break;
 
       case dex::DBG_START_LOCAL: {
@@ -222,7 +222,7 @@
         int adjusted_opcode = opcode - dex::DBG_FIRST_SPECIAL;
         line += dex::DBG_LINE_BASE + (adjusted_opcode % dex::DBG_LINE_RANGE);
         address += (adjusted_opcode / dex::DBG_LINE_RANGE);
-        SLICER_WEAK_CHECK(line > 0);
+        SLICER_WEAK_CHECK(line >= 0);
         annotation = Alloc<DbgInfoAnnotation>(dex::DBG_ADVANCE_LINE);
         annotation->operands.push_back(Alloc<LineNumber>(line));
       } break;
diff --git a/slicer/debuginfo_encoder.cc b/slicer/debuginfo_encoder.cc
index 3bd1d4d..e8c3519 100644
--- a/slicer/debuginfo_encoder.cc
+++ b/slicer/debuginfo_encoder.cc
@@ -55,7 +55,7 @@
         SLICER_CHECK_GE(line, 0);
         line_start_ = line;
       } else {
-        SLICER_WEAK_CHECK(line > 0);
+        SLICER_WEAK_CHECK(line >= 0);
         int delta = line - last_line_;
         int adj_opcode = delta - dex::DBG_LINE_BASE;
         // out of range for special opcode?
diff --git a/slicer/export/slicer/code_ir.h b/slicer/export/slicer/code_ir.h
index c20c8f6..dc941af 100644
--- a/slicer/export/slicer/code_ir.h
+++ b/slicer/export/slicer/code_ir.h
@@ -396,7 +396,7 @@
   int line = 0;
 
   explicit LineNumber(int line) : line(line) {
-    SLICER_WEAK_CHECK(line > 0);
+    SLICER_WEAK_CHECK(line >= 0);
   }
 
   virtual bool Accept(Visitor* visitor) override { return visitor->Visit(this); }