aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-05-13 09:23:03 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-05-13 09:54:56 -0700
commit8e3ab28be95de4faca64d5abab21f1948f71510b (patch)
treee7a1a0c73840e846d19260d412601cb93c608775 /src/codegen.cpp
parent774ec1f88992667529a7b3c149b59b68eb4f2c59 (diff)
downloadzig-8e3ab28be95de4faca64d5abab21f1948f71510b.tar.gz
zig-8e3ab28be95de4faca64d5abab21f1948f71510b.zip
ability to cast maybe pointer to isize/usize
also ability to put noalias on maybe pointer
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index d30c9e3f44..f42cf5a1a0 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -3923,7 +3923,7 @@ static void do_code_gen(CodeGen *g) {
TypeTableEntry *param_type = info->type;
LLVMValueRef argument_val = LLVMGetParam(fn_table_entry->fn_value, gen_index);
bool param_is_noalias = param_node->data.param_decl.is_noalias;
- if (param_type->id == TypeTableEntryIdPointer && param_is_noalias) {
+ if (param_is_noalias) {
LLVMAddAttribute(argument_val, LLVMNoAliasAttribute);
}
if ((param_type->id == TypeTableEntryIdPointer && (param_type->data.pointer.is_const || fn_table_entry->is_pure)) ||