Merge pull request #2835 from lewurm/fix-make-dist
authormonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 6 Apr 2016 01:40:27 +0000 (02:40 +0100)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 6 Apr 2016 01:40:27 +0000 (02:40 +0100)
[sqlmetal] fixup for a73fb31f2 in order to fix `make dist'

mono/metadata/mono-basic-block.c
mono/utils/mono-error.c

index 564c83a6151db8cba9ce666d90a3b85ccef6cc2d..5ccb938df9b03a0f8dfb9a77c6a8accb80e9c2f0 100644 (file)
@@ -240,6 +240,8 @@ bb_split (MonoSimpleBasicBlock *first, MonoSimpleBasicBlock *hint, MonoSimpleBas
 {
        MonoSimpleBasicBlock *res, *bb = first;
 
+       mono_error_init (error);
+
        if (bb_idx_is_contained (hint, target)) {
                first = hint;
        } else if (hint->next && bb_idx_is_contained (hint->next, target)) {
@@ -336,6 +338,8 @@ bb_formation_il_pass (const unsigned char *start, const unsigned char *end, Mono
        MonoSimpleBasicBlock *branch, *next, *current;
        const MonoOpcode *opcode;
 
+       mono_error_init (error);
+
        current = bb;
 
        while (ip < end) {
@@ -464,6 +468,9 @@ bb_formation_eh_pass (MonoMethodHeader *header, MonoSimpleBasicBlock *bb, MonoSi
 {
        int i;
        int end = header->code_size;
+
+       mono_error_init (error);
+
        /*We must split at all points to verify for targets in the middle of an instruction*/
        for (i = 0; i < header->num_clauses; ++i) {
                MonoExceptionClause *clause = header->clauses + i;
@@ -520,6 +527,8 @@ mono_basic_block_split (MonoMethod *method, MonoError *error, MonoMethodHeader *
        MonoSimpleBasicBlock *bb, *root;
        const unsigned char *start, *end;
 
+       mono_error_init (error);
+
        start = header->code;
        end = start + header->code_size;
 
index 7bc5950e4b80d1b0da48d17d8aafc0cc50fc3bfb..7cbce5cf765d3a0e8730327fa626bee8158ce54f 100644 (file)
@@ -89,6 +89,13 @@ mono_error_init_flags (MonoError *oerror, unsigned short flags)
        error->flags = flags;
 }
 
+/**
+ * mono_error_init:
+ * @error: Pointer to MonoError struct to initialize
+ *
+ * Any function which takes a MonoError for purposes of reporting an error
+ * is required to call either this or mono_error_init_flags on entry.
+ */
 void
 mono_error_init (MonoError *error)
 {