aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-06-20 06:45:45 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-06-20 06:46:53 -0400
commit55193cb13bbc69350474f6a66728319b41149274 (patch)
tree1c16243809e6c1322d008cbc082268e631cfd5d6 /src/codegen.cpp
parent7c99c30bf406342a45833963ce630bb104aef00e (diff)
downloadzig-55193cb13bbc69350474f6a66728319b41149274.tar.gz
zig-55193cb13bbc69350474f6a66728319b41149274.zip
fix runtime fn ptr equality codegen
closes #1140
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 20268d636a..c2406f0838 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -2246,12 +2246,12 @@ static LLVMValueRef ir_render_bin_op(CodeGen *g, IrExecutable *executable,
} else if (type_entry->id == TypeTableEntryIdInt) {
LLVMIntPredicate pred = cmp_op_to_int_predicate(op_id, type_entry->data.integral.is_signed);
return LLVMBuildICmp(g->builder, pred, op1_value, op2_value, "");
- } else if (type_entry->id == TypeTableEntryIdEnum) {
- LLVMIntPredicate pred = cmp_op_to_int_predicate(op_id, false);
- return LLVMBuildICmp(g->builder, pred, op1_value, op2_value, "");
- } else if (type_entry->id == TypeTableEntryIdErrorSet ||
+ } else if (type_entry->id == TypeTableEntryIdEnum ||
+ type_entry->id == TypeTableEntryIdErrorSet ||
type_entry->id == TypeTableEntryIdPointer ||
- type_entry->id == TypeTableEntryIdBool)
+ type_entry->id == TypeTableEntryIdBool ||
+ type_entry->id == TypeTableEntryIdPromise ||
+ type_entry->id == TypeTableEntryIdFn)
{
LLVMIntPredicate pred = cmp_op_to_int_predicate(op_id, false);
return LLVMBuildICmp(g->builder, pred, op1_value, op2_value, "");