[llvmonly] Fix the build.
authorZoltan Varga <vargaz@gmail.com>
Fri, 9 Oct 2015 03:07:20 +0000 (23:07 -0400)
committerZoltan Varga <vargaz@gmail.com>
Fri, 9 Oct 2015 03:07:20 +0000 (23:07 -0400)
mono/mini/mini-llvm.c

index 3997ec599e4fca9bf3221fc4c4f059cc86da7bf8..226f15c3083fb8e9d5d507d48f348ca20c4c2b62 100644 (file)
@@ -7112,7 +7112,10 @@ emit_aot_file_info (MonoLLVMModule *lmodule)
                fields [tindex ++] = LLVMConstNull (eltype);
                fields [tindex ++] = LLVMConstNull (eltype);
        }
-       fields [tindex ++] = AddJitGlobal (lmodule, eltype, "method_addresses");
+       if (!lmodule->llvm_only)
+               fields [tindex ++] = AddJitGlobal (lmodule, eltype, "method_addresses");
+       else
+               fields [tindex ++] = LLVMConstNull (eltype);
        fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "blob");
        fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "class_name_table");
        fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "class_info_offsets");
@@ -7143,10 +7146,10 @@ emit_aot_file_info (MonoLLVMModule *lmodule)
        else
                fields [tindex ++] = LLVMConstNull (eltype);
        fields [tindex ++] = LLVMGetNamedGlobal (lmodule->module, "assembly_name");
-       fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt");
-       fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt_end");
-       fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unwind_info");
        if (!lmodule->llvm_only) {
+               fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt");
+               fields [tindex ++] = AddJitGlobal (lmodule, eltype, "plt_end");
+               fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unwind_info");
                fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unbox_trampolines");
                fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unbox_trampolines_end");
                fields [tindex ++] = AddJitGlobal (lmodule, eltype, "unbox_trampoline_addresses");
@@ -7154,6 +7157,9 @@ emit_aot_file_info (MonoLLVMModule *lmodule)
                fields [tindex ++] = LLVMConstNull (eltype);
                fields [tindex ++] = LLVMConstNull (eltype);
                fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
+               fields [tindex ++] = LLVMConstNull (eltype);
        }
 
        for (i = 0; i < MONO_AOT_FILE_INFO_NUM_SYMBOLS; ++i)