aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-09-30 21:38:04 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-09-30 21:38:04 -0700
commit3eb729b442d6cc69bd9a9d37816e9458190bc30b (patch)
treea412281c18914503c1566e79ab6a6f4eea187bf3 /src/stage1/analyze.cpp
parent1f653b7f8e9e358a5bfe2695a11c01da56f3d5ee (diff)
parentc4cd592f0e1eeff5a4056796610d97010ae4e38c (diff)
downloadzig-3eb729b442d6cc69bd9a9d37816e9458190bc30b.tar.gz
zig-3eb729b442d6cc69bd9a9d37816e9458190bc30b.zip
Merge remote-tracking branch 'origin/master' into llvm13
Diffstat (limited to 'src/stage1/analyze.cpp')
-rw-r--r--src/stage1/analyze.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/stage1/analyze.cpp b/src/stage1/analyze.cpp
index 2eb609ef1a..ec4ff8fc9e 100644
--- a/src/stage1/analyze.cpp
+++ b/src/stage1/analyze.cpp
@@ -1019,6 +1019,16 @@ bool calling_convention_allows_zig_types(CallingConvention cc) {
zig_unreachable();
}
+const char *address_space_name(AddressSpace as) {
+ switch (as) {
+ case AddressSpaceGeneric: return "generic";
+ case AddressSpaceGS: return "gs";
+ case AddressSpaceFS: return "fs";
+ case AddressSpaceSS: return "ss";
+ }
+ zig_unreachable();
+}
+
ZigType *get_stack_trace_type(CodeGen *g) {
if (g->stack_trace_type == nullptr) {
g->stack_trace_type = get_builtin_type(g, "StackTrace");
@@ -6794,7 +6804,7 @@ static Error resolve_async_frame(CodeGen *g, ZigType *frame_type) {
// Since this frame is async, an await might represent a suspend point, and
// therefore need to spill. It also needs to mark expr scopes as having to spill.
// For example: foo() + await z
- // The funtion call result of foo() must be spilled.
+ // The function call result of foo() must be spilled.
for (size_t i = 0; i < fn->await_list.length; i += 1) {
Stage1AirInstAwait *await = fn->await_list.at(i);
if (await->is_nosuspend) {