mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-20 03:55:48 -04:00

This patch is a follow-up for commit 4e2ce228ae
[BPF] Add preserve_access_index attribute for record definition
to restrict attribute for C only. A new test case is added
to check for this restriction.
Additional code polishing is done based on
Aaron Ballman's suggestion in https://reviews.llvm.org/D69759/new/.
Differential Revision: https://reviews.llvm.org/D70257
10 lines
275 B
C++
10 lines
275 B
C++
// RUN: %clang_cc1 -x c++ -triple bpf-pc-linux-gnu -dwarf-version=4 -fsyntax-only -verify %s
|
|
|
|
#define __reloc__ __attribute__((preserve_access_index))
|
|
|
|
struct t1 {
|
|
int a;
|
|
int b[4];
|
|
int c:1;
|
|
} __reloc__; // expected-warning {{'preserve_access_index' attribute ignored}}
|