ability to cast maybe pointer to isize/usize

also ability to put noalias on maybe pointer
This commit is contained in:
Andrew Kelley
2016-05-13 09:23:03 -07:00
parent 774ec1f889
commit 8e3ab28be9
4 changed files with 48 additions and 7 deletions

View File

@@ -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)) ||