llvm-project/clang/test/CodeGen/disable-tail-calls.c
Nikita Popov 0f0623ab87 [Clang] Remove some explicit -opaque-pointers options in tests (NFC)
This is the default, so don't specify it explicitly, in preparation
for removing the option.
2023-06-08 17:41:27 +02:00

17 lines
394 B
C

// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm -O2 -fno-optimize-sibling-calls -o - < %s | FileCheck %s
typedef struct List {
struct List *next;
int data;
} List;
// CHECK-LABEL: define{{.*}} ptr @find(
List *find(List *head, int data) {
if (!head)
return 0;
if (head->data == data)
return head;
// CHECK: call ptr @find(
return find(head->next, data);
}