Fix LLVM #includes and push one piece of LLVM-specific lossage down.

Change-Id: I9f2b7a9fd4d543a3bd9dd9f4c62367c28c69ea36
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index c5e620b..5ef1710 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -255,7 +255,10 @@
     class_loader, class_linker, dex_file, *dex_cache, NULL,
     method_idx, access_flags);
 
-  return compiler.GetCompilerLLVM()->CompileNativeMethod(&oat_compilation_unit);
+  art::CompiledMethod* result =
+      compiler.GetCompilerLLVM()->CompileNativeMethod(&oat_compilation_unit);
+  compiler.GetCompilerLLVM()->MaterializeIfThresholdReached();
+  return result;
 }
 
 extern "C" art::CompiledInvokeStub* ArtCreateInvokeStub(art::Compiler& compiler, bool is_static,
@@ -270,11 +273,6 @@
   compiler.GetCompilerLLVM()->MaterializeRemainder();
 }
 
-extern "C" void compilerLLVMMaterializeIfThresholdReached(art::Compiler& compiler) {
-  ensureCompilerLLVM(compiler);
-  compiler.GetCompilerLLVM()->MaterializeIfThresholdReached();
-}
-
 // Note: Using this function carefully!!! This is temporary solution, we will remove it.
 extern "C" art::MutexLock* compilerLLVMMutexLock(art::Compiler& compiler) {
   ensureCompilerLLVM(compiler);
diff --git a/src/compiler_llvm/utils_llvm.cc b/src/compiler_llvm/utils_llvm.cc
index bc2a7f8..6acf076 100644
--- a/src/compiler_llvm/utils_llvm.cc
+++ b/src/compiler_llvm/utils_llvm.cc
@@ -14,18 +14,19 @@
  * limitations under the License.
  */
 
-#include <android/librsloader.h>
-#include <cutils/log.h>
+#include "utils_llvm.h"
+
 #include <fcntl.h>
 #include <string.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
 
-#include "utils_llvm.h"
-
+#include "android/librsloader.h"
 #include "class_loader.h"
 #include "object.h"
 #include "object_utils.h"
-
 #include "runtime_support_llvm.h"
 
 namespace art {