aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authordimenus <ryan.saunderson88@gmail.com>2017-11-22 10:01:43 -0600
committerRyan Saunderson <ryan.saunderson@kiriworks.com>2017-11-27 11:23:14 -0600
commit04472f57be5e91e82adf9346e71c1421725716d5 (patch)
tree7c9cddd7234a4c79fb6aa548ddf4984ccbb175da /src/ir.cpp
parent1b0e90f70b4dc26c2ba96b7b5709a3ff269bb48a (diff)
downloadzig-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.cpp3
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);
}
}
}