Fix oatwriter code deduping

Now that the GC maps are part of the oat method header they need
to be checked in CodeOffsetsKeyComparator.

Bug: 18523556

Change-Id: I539a6e7216166342b22515c1e2cf831dad32e41e
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index b59ab13..00245c4 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -146,7 +146,7 @@
   CHECK(code != nullptr);
   const byte* base = reinterpret_cast<const byte*>(code);  // Base of data points at code.
   base -= kPointerSize;  // Move backward so that code_offset != 0.
-  uint32_t  code_offset = kPointerSize;
+  uint32_t code_offset = kPointerSize;
   return OatFile::OatMethod(base, code_offset);
 }
 
diff --git a/compiler/oat_writer.h b/compiler/oat_writer.h
index 945048e..bd7bbc6 100644
--- a/compiler/oat_writer.h
+++ b/compiler/oat_writer.h
@@ -317,6 +317,9 @@
       if (UNLIKELY(&lhs->GetVmapTable() != &rhs->GetVmapTable())) {
         return &lhs->GetVmapTable() < &rhs->GetVmapTable();
       }
+      if (UNLIKELY(&lhs->GetGcMap() != &rhs->GetGcMap())) {
+        return &lhs->GetGcMap() < &rhs->GetGcMap();
+      }
       return false;
     }
   };