[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Frontend / embed-object.c
blobfebac4272ff8bb70e194547d9b216408420b5ca8
1 // RUN: %clang_cc1 -x c -triple x86_64-unknown-linux-gnu -emit-llvm -fembed-offload-object=%S/Inputs/empty.h -o - %s | FileCheck %s
3 // CHECK: @[[OBJECT:.+]] = private constant [0 x i8] zeroinitializer, section ".llvm.offloading", align 8, !exclude
4 // CHECK: @llvm.compiler.used = appending global [1 x ptr] [ptr @[[OBJECT]]], section "llvm.metadata"
6 void foo(void) {}
8 // CHECK: !llvm.embedded.objects = !{![[METADATA:[0-9]+]]}
9 // CHECK: ![[METADATA]] = !{ptr @[[OBJECT]], !".llvm.offloading"}