root/tools/testing/selftests/bpf/progs/btf_dump_test_case_namespacing.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. f

   1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
   2 
   3 /*
   4  * BTF-to-C dumper test validating no name versioning happens between
   5  * independent C namespaces (struct/union/enum vs typedef/enum values).
   6  *
   7  * Copyright (c) 2019 Facebook
   8  */
   9 /* ----- START-EXPECTED-OUTPUT ----- */
  10 struct S {
  11         int S;
  12         int U;
  13 };
  14 
  15 typedef struct S S;
  16 
  17 union U {
  18         int S;
  19         int U;
  20 };
  21 
  22 typedef union U U;
  23 
  24 enum E {
  25         V = 0,
  26 };
  27 
  28 typedef enum E E;
  29 
  30 struct A {};
  31 
  32 union B {};
  33 
  34 enum C {
  35         A = 1,
  36         B = 2,
  37         C = 3,
  38 };
  39 
  40 struct X {};
  41 
  42 union Y {};
  43 
  44 enum Z;
  45 
  46 typedef int X;
  47 
  48 typedef int Y;
  49 
  50 typedef int Z;
  51 
  52 /*------ END-EXPECTED-OUTPUT ------ */
  53 
  54 int f(struct {
  55         struct S _1;
  56         S _2;
  57         union U _3;
  58         U _4;
  59         enum E _5;
  60         E _6;
  61         struct A a;
  62         union B b;
  63         enum C c;
  64         struct X x;
  65         union Y y;
  66         enum Z *z;
  67         X xx;
  68         Y yy;
  69         Z zz;
  70 } *_)
  71 {
  72         return 0;
  73 }

/* [<][>][^][v][top][bottom][index][help] */