diff options
| author | dimenus <ryan.saunderson88@gmail.com> | 2017-11-22 10:01:43 -0600 |
|---|---|---|
| committer | Ryan Saunderson <ryan.saunderson@kiriworks.com> | 2017-11-27 11:23:14 -0600 |
| commit | 04472f57be5e91e82adf9346e71c1421725716d5 (patch) | |
| tree | 7c9cddd7234a4c79fb6aa548ddf4984ccbb175da /src/ir.cpp | |
| parent | 1b0e90f70b4dc26c2ba96b7b5709a3ff269bb48a (diff) | |
| download | zig-04472f57be5e91e82adf9346e71c1421725716d5.tar.gz zig-04472f57be5e91e82adf9346e71c1421725716d5.zip | |
Added support for exporting of C field expressions
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index f632a261f6..7c15b48bee 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -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); } } } |
