1*9880d681SAndroid Build Coastguard Worker void call(); 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker struct S { fooS4*9880d681SAndroid Build Coastguard Worker static void foo() { call(); call(); } barS5*9880d681SAndroid Build Coastguard Worker static void bar() { call(); call(); } bazS6*9880d681SAndroid Build Coastguard Worker static void baz() {} 7*9880d681SAndroid Build Coastguard Worker }; 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker #ifdef FILE1 10*9880d681SAndroid Build Coastguard Worker # define FUNC_NAME func1 11*9880d681SAndroid Build Coastguard Worker # define FUNC_BODY \ 12*9880d681SAndroid Build Coastguard Worker S::foo(); S::bar(); S::baz(); 13*9880d681SAndroid Build Coastguard Worker #else 14*9880d681SAndroid Build Coastguard Worker # define FUNC_NAME func2 15*9880d681SAndroid Build Coastguard Worker # define FUNC_BODY \ 16*9880d681SAndroid Build Coastguard Worker S::bar(); 17*9880d681SAndroid Build Coastguard Worker #endif 18*9880d681SAndroid Build Coastguard Worker FUNC_NAME()19*9880d681SAndroid Build Coastguard Workervoid FUNC_NAME() { 20*9880d681SAndroid Build Coastguard Worker FUNC_BODY 21*9880d681SAndroid Build Coastguard Worker } 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker // Build instructions: 24*9880d681SAndroid Build Coastguard Worker // $ clang -g -fPIC -c -DFILE1 arange-overlap.cc -o obj1.o 25*9880d681SAndroid Build Coastguard Worker // $ clang -g -fPIC -c arange-overlap.cc -o obj2.o 26*9880d681SAndroid Build Coastguard Worker // $ clang -shared obj1.o obj2.o -o <output> 27