brintos

brintos / llvm-project-archived public Read only

0
0
Text · 391 B · 0ddf603 Raw
18 lines · c
1// REQUIRES: x86-registered-target2// RUN: %clang_cc1 -triple x86_64 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s3 4// Verify that __attribute__((preserve_static_offset))5// has no effect for non-BPF target.6 7#define __ctx __attribute__((preserve_static_offset))8 9struct foo {10  int a;11} __ctx;12 13// CHECK-NOT: @llvm_preserve_static_offset14 15int bar(struct foo *p) {16  return p->a;17}18