Skip to content

Commit

Permalink
l2s: couple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugobros3 committed Jul 17, 2024
1 parent 02d042e commit 9fc1e75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/frontend/llvm/l2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ bool parse_llvm_into_shady(const CompilerConfig* config, size_t len, const char*
if (global_annotations)
process_llvm_annotations(&p, global_annotations);

for (LLVMValueRef fn = LLVMGetFirstFunction(src); fn && fn <= LLVMGetNextFunction(fn); fn = LLVMGetLastFunction(src)) {
for (LLVMValueRef fn = LLVMGetFirstFunction(src); fn; fn = LLVMGetNextFunction(fn)) {
convert_function(&p, fn);
}

Expand Down
4 changes: 4 additions & 0 deletions src/frontend/llvm/l2s_instr.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ EmittedInstr convert_instruction(Parser* p, FnParseCtx* fn_ctx, Node* fn_or_bb,
// don't care
return (EmittedInstr) { 0 };
}
if (string_starts_with(intrinsic, "llvm.experimental.noalias.scope.decl")) {
// don't care
return (EmittedInstr) { 0 };
}
if (string_starts_with(intrinsic, "llvm.memcpy")) {
Nodes ops = convert_operands(p, num_ops, instr);
num_results = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/llvm/l2s_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Type* convert_type(Parser* p, LLVMTypeRef t) {
}

const Node* product = record_type(a, (RecordType) {
.members = nodes(a, size, celements)
.members = nodes(a, size, celements)
});
if (decl)
decl->payload.nom_type.body = product;
Expand Down

0 comments on commit 9fc1e75

Please sign in to comment.