Ignore frame-larger-than warning for auto generated code.

Change-Id: I2fd44f7fd54899d905b2630c2373e02251562617
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 9e4bc67..81cfe51 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -223,8 +223,9 @@
 	src/compiler_llvm/compiler_llvm.cc \
 	src/compiler_llvm/dalvik_reg.cc \
 	src/compiler_llvm/frontend.cc \
-	src/compiler_llvm/ir_builder.cc \
+	src/compiler_llvm/generated/art_module.cc \
 	src/compiler_llvm/inferred_reg_category_map.cc \
+	src/compiler_llvm/ir_builder.cc \
 	src/compiler_llvm/method_compiler.cc \
 	src/compiler_llvm/upcall_compiler.cc \
 	src/compiler_llvm/utils_llvm.cc
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index 21a7bb9..038e826 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -32,10 +32,7 @@
 namespace compiler_llvm {
 
 
-namespace {
-using namespace llvm;
-#include "art_module.cc"
-}
+llvm::Module* makeLLVMModuleContents(llvm::Module* module);
 
 
 CompilerLLVM::CompilerLLVM(Compiler* compiler, InstructionSet insn_set)
diff --git a/src/compiler_llvm/art_module.cc b/src/compiler_llvm/generated/art_module.cc
similarity index 98%
rename from src/compiler_llvm/art_module.cc
rename to src/compiler_llvm/generated/art_module.cc
index c06c04a..9ef0867 100644
--- a/src/compiler_llvm/art_module.cc
+++ b/src/compiler_llvm/generated/art_module.cc
@@ -1,4 +1,22 @@
-// Generated with ./tools/gen_art_module_cc.sh
+// Generated with ../tools/gen_art_module_cc.sh
+
+
+#pragma GCC diagnostic ignored "-Wframe-larger-than="
+// TODO: Remove this pragma after llc can generate makeLLVMModuleContents()
+// with smaller frame size.
+
+#include <llvm/DerivedTypes.h>
+#include <llvm/Function.h>
+#include <llvm/Module.h>
+#include <llvm/Type.h>
+
+#include <vector>
+
+using namespace llvm;
+
+namespace art {
+namespace compiler_llvm {
+
 
 // Generated by llvm2cpp - DO NOT MODIFY!
 
@@ -709,3 +727,6 @@
 return mod;
 
 }
+
+} // namespace compiler_llvm
+} // namespace art
diff --git a/src/compiler_llvm/tools/gen_art_module_cc.sh b/src/compiler_llvm/tools/gen_art_module_cc.sh
index bc203a4..46360af 100755
--- a/src/compiler_llvm/tools/gen_art_module_cc.sh
+++ b/src/compiler_llvm/tools/gen_art_module_cc.sh
@@ -17,9 +17,34 @@
 SCRIPTDIR=`dirname "$0"`
 cd "${SCRIPTDIR}/.."
 
-OUTPUT_FILE=art_module.cc
+mkdir -p generated
+
+OUTPUT_FILE=generated/art_module.cc
 
 echo "// Generated with ${0}" > ${OUTPUT_FILE}
-echo '' >> ${OUTPUT_FILE}
+
+echo '
+
+#pragma GCC diagnostic ignored "-Wframe-larger-than="
+// TODO: Remove this pragma after llc can generate makeLLVMModuleContents()
+// with smaller frame size.
+
+#include <llvm/DerivedTypes.h>
+#include <llvm/Function.h>
+#include <llvm/Module.h>
+#include <llvm/Type.h>
+
+#include <vector>
+
+using namespace llvm;
+
+namespace art {
+namespace compiler_llvm {
+
+' >> ${OUTPUT_FILE}
 
 llc -march=cpp -cppgen=contents art_module.ll -o - >> ${OUTPUT_FILE}
+
+echo '
+} // namespace compiler_llvm
+} // namespace art' >> ${OUTPUT_FILE}