Fix link bug in LLVM.

Passing 4 run tests.

Change-Id: I01e0fc37a1662174891a88b4304a528378fe65fe
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 4a38493..08792eb 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1353,7 +1353,6 @@
 }
 
 const OatFile::OatMethod ClassLinker::GetOatMethodFor(const Method* method) {
-  CHECK(Runtime::Current()->IsCompiler() || method->GetDeclaringClass()->IsInitializing());
   // Although we overwrite the trampoline of non-static methods, we may get here via the resolution
   // method for direct methods (or virtual methods made direct).
   Class* declaring_class = method->GetDeclaringClass();
@@ -1384,6 +1383,7 @@
 
 // Special case to get oat code without overwriting a trampoline.
 const void* ClassLinker::GetOatCodeFor(const Method* method) {
+  CHECK(Runtime::Current()->IsCompiler() || method->GetDeclaringClass()->IsInitializing());
   return GetOatMethodFor(method).GetCode();
 }