Home | History | Annotate | Download | only in Inputs
      1 void call();
      2 
      3 struct S {
      4   static void foo() { call(); call(); }
      5   static void bar() { call(); call(); }
      6   static void baz() {}
      7 };
      8 
      9 #ifdef FILE1
     10 # define FUNC_NAME func1
     11 # define FUNC_BODY \
     12     S::foo(); S::bar(); S::baz();
     13 #else
     14 # define FUNC_NAME func2
     15 # define FUNC_BODY \
     16     S::bar();
     17 #endif
     18 
     19 void FUNC_NAME() {
     20   FUNC_BODY
     21 }
     22 
     23 // Build instructions:
     24 // $ clang -g -fPIC -c -DFILE1 arange-overlap.cc -o obj1.o
     25 // $ clang -g -fPIC -c arange-overlap.cc -o obj2.o
     26 // $ clang -shared obj1.o obj2.o -o <output>
     27