[Flang] remove whole-archive option for AIX linker (#76039)
[llvm-project.git] / clang / test / CodeGen / bpf-preserve-static-offset-non-bpf.c
blob3fe8d2517fe30afc36014dfdc21589c6a3f9a6ac
1 // REQUIRES: x86-registered-target
2 // RUN: %clang -cc1 -triple x86_64 -disable-llvm-passes -S -emit-llvm -o - %s \
3 // RUN: | FileCheck %s
5 // Verify that __attribute__((preserve_static_offset))
6 // has no effect for non-BPF target.
8 #define __ctx __attribute__((preserve_static_offset))
10 struct foo {
11 int a;
12 } __ctx;
14 // CHECK-NOT: @llvm_preserve_static_offset
16 int bar(struct foo *p) {
17 return p->a;