diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-05-10 15:44:40 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-05-10 15:44:40 -0700 |
| commit | c4c5020f0267758c7eb127689177cf1a70fb6d97 (patch) | |
| tree | e2acc6873952863d72d1a1e55104a3518fdefc89 /src/stage1/codegen.cpp | |
| parent | 9654a54d4a2729200d38dbb6eec827cb03dc0f90 (diff) | |
| download | zig-c4c5020f0267758c7eb127689177cf1a70fb6d97.tar.gz zig-c4c5020f0267758c7eb127689177cf1a70fb6d97.zip | |
fixups to the previous commit
* Rename std.builtin.GlobalVisibility to std.builtin.SymbolVisibility
* Add missing compile error. From the LLVM language reference: "A
symbol with internal or private linkage must have default
visibility."
Diffstat (limited to 'src/stage1/codegen.cpp')
| -rw-r--r-- | src/stage1/codegen.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/stage1/codegen.cpp b/src/stage1/codegen.cpp index dece8e7348..e057a8cc80 100644 --- a/src/stage1/codegen.cpp +++ b/src/stage1/codegen.cpp @@ -242,13 +242,13 @@ static LLVMLinkage to_llvm_linkage(GlobalLinkageId id, bool is_extern) { zig_unreachable(); } -static LLVMVisibility to_llvm_visibility(GlobalVisibilityId id) { +static LLVMVisibility to_llvm_visibility(SymbolVisibilityId id) { switch (id) { - case GlobalVisibilityIdDefault: + case SymbolVisibilityIdDefault: return LLVMDefaultVisibility; - case GlobalVisibilityIdHidden: + case SymbolVisibilityIdHidden: return LLVMHiddenVisibility; - case GlobalVisibilityIdProtected: + case SymbolVisibilityIdProtected: return LLVMProtectedVisibility; } zig_unreachable(); @@ -412,7 +412,7 @@ static LLVMValueRef make_fn_llvm_value(CodeGen *g, ZigFn *fn) { const char *unmangled_name = buf_ptr(&fn->symbol_name); const char *symbol_name; GlobalLinkageId linkage; - GlobalVisibilityId visibility = GlobalVisibilityIdDefault; + SymbolVisibilityId visibility = SymbolVisibilityIdDefault; if (fn->body_node == nullptr) { symbol_name = unmangled_name; linkage = GlobalLinkageIdStrong; @@ -8967,7 +8967,7 @@ static void do_code_gen(CodeGen *g) { assert(var->decl_node); GlobalLinkageId linkage; - GlobalVisibilityId visibility = GlobalVisibilityIdDefault; + SymbolVisibilityId visibility = SymbolVisibilityIdDefault; const char *unmangled_name = var->name; const char *symbol_name; if (var->export_list.length == 0) { |
