You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
511 B

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>