Debian Codegraph @

clang/test/CodeGen/bpf-preserve-static-offset-non-bpf.c

raw
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s
3
4 // Verify that __attribute__((preserve_static_offset))
5 // has no effect for non-BPF target.
6
7 #define __ctx __attribute__((preserve_static_offset))
8
9 struct foo {
10 int a;
11 } __ctx;
12
13 // CHECK-NOT: @llvm_preserve_static_offset
14
15 int bar(struct foo *p) {
16 return p->a;
17 }