1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // Check that the CHECK lines are generated before the definition and not the declaration
3 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s
7 void empty_function(void);
11 // CHECK-NEXT: [[RETVAL:%.*]] = alloca i32, align 4
12 // CHECK-NEXT: store i32 0, ptr [[RETVAL]], align 4
13 // CHECK-NEXT: call void @empty_function()
14 // CHECK-NEXT: [[CALL:%.*]] = call i32 @foo(i32 noundef 1)
15 // CHECK-NEXT: ret i32 [[CALL]]
24 // CHECK-NEXT: [[ARG_ADDR:%.*]] = alloca i32, align 4
25 // CHECK-NEXT: store i32 [[ARG:%.*]], ptr [[ARG_ADDR]], align 4
26 // CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[ARG_ADDR]], align 4
27 // CHECK-NEXT: ret i32 [[TMP0]]
33 // CHECK-LABEL: @empty_function(
35 // CHECK-NEXT: ret void
37 void empty_function(void) {}