Added support for exporting of C field expressions

This commit is contained in:
dimenus
2017-11-22 10:01:43 -06:00
committed by Ryan Saunderson
parent 1b0e90f70b
commit 04472f57be
5 changed files with 70 additions and 9 deletions

View File

@@ -6302,8 +6302,9 @@ static Buf *get_anon_type_name(CodeGen *codegen, IrExecutable *exec, const char
buf_appendf(name, ")");
return name;
} else {
//Note: C-imports do not have valid location information
return buf_sprintf("(anonymous %s at %s:%" ZIG_PRI_usize ":%" ZIG_PRI_usize ")", kind_name,
buf_ptr(source_node->owner->path), source_node->line + 1, source_node->column + 1);
(source_node->owner->path != nullptr) ? buf_ptr(source_node->owner->path) : "(null)", source_node->line + 1, source_node->column + 1);
}
}
}