reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
void call();

struct S {
  static void foo() { call(); call(); }
  static void bar() { call(); call(); }
  static void baz() {}
};

#ifdef FILE1
# define FUNC_NAME func1
# define FUNC_BODY \
    S::foo(); S::bar(); S::baz();
#else
# define FUNC_NAME func2
# define FUNC_BODY \
    S::bar();
#endif

void FUNC_NAME() {
  FUNC_BODY
}

// Build instructions:
// $ clang -g -fPIC -c -DFILE1 arange-overlap.cc -o obj1.o
// $ clang -g -fPIC -c arange-overlap.cc -o obj2.o
// $ clang -shared obj1.o obj2.o -o <output>