Fix x86 build.

Also fix attributes/annotalysis on entrypoint_utils functions now we have
clang that is smarter wrt warnings than GCC.

Change-Id: I69257b4ad9a27d07acbc973d21a1cfa4260a8ed6
diff --git a/runtime/method_helper.cc b/runtime/method_helper.cc
index 4b1b1da..1bd2f90 100644
--- a/runtime/method_helper.cc
+++ b/runtime/method_helper.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "method_helper.h"
+#include "method_helper-inl.h"
 
 #include "class_linker.h"
 #include "dex_file-inl.h"
@@ -53,6 +53,32 @@
   return dex_file->GetMethodSignature(mid) == other_dex_file->GetMethodSignature(other_mid);
 }
 
+bool MethodHelper::HasSameSignatureWithDifferentClassLoaders(MethodHelper* other) {
+  if (UNLIKELY(GetReturnType() != other->GetReturnType())) {
+    return false;
+  }
+  const DexFile::TypeList* types = method_->GetParameterTypeList();
+  const DexFile::TypeList* other_types = other->method_->GetParameterTypeList();
+  if (types == nullptr) {
+    return (other_types == nullptr) || (other_types->Size() == 0);
+  } else if (UNLIKELY(other_types == nullptr)) {
+    return types->Size() == 0;
+  }
+  uint32_t num_types = types->Size();
+  if (UNLIKELY(num_types != other_types->Size())) {
+    return false;
+  }
+  for (uint32_t i = 0; i < num_types; ++i) {
+    mirror::Class* param_type = GetClassFromTypeIdx(types->GetTypeItem(i).type_idx_);
+    mirror::Class* other_param_type =
+        other->GetClassFromTypeIdx(other_types->GetTypeItem(i).type_idx_);
+    if (UNLIKELY(param_type != other_param_type)) {
+      return false;
+    }
+  }
+  return true;
+}
+
 uint32_t MethodHelper::FindDexMethodIndexInOtherDexFile(const DexFile& other_dexfile)
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   mirror::ArtMethod* method = GetMethod();