Fix 004-annotation because we missed the linking.

Change-Id: Ic74d58b29b5a78aa31fb60b2c62912369af1d3aa
diff --git a/src/class_linker.cc b/src/class_linker.cc
index b94003a..567415c 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -2226,6 +2226,14 @@
   size_t num_virtual_methods = methods->GetLength();
   klass->SetVirtualMethods(AllocObjectArray<Method>(num_virtual_methods));
   for (size_t i = 0; i < num_virtual_methods; ++i) {
+#if defined(ART_USE_LLVM_COMPILER)
+    Method* method = methods->Get(i);
+    // Ensure link.
+    // TODO: Remove this after fixing the link problem by in-place linking.
+    if (method->GetCode() == NULL || method->GetInvokeStub() == NULL) {
+      Runtime::Current()->GetClassLinker()->LinkOatCodeFor(methods->Get(i));
+    }
+#endif
     SirtRef<Method> prototype(methods->Get(i));
     klass->SetVirtualMethod(i, CreateProxyMethod(klass, prototype));
   }