brintos

brintos / llvm-project-archived public Read only

0
0
Text · 511 B · 82e3f12 Raw
27 lines · plain
1void call();2 3struct S {4  static void foo() { call(); call(); }5  static void bar() { call(); call(); }6  static void baz() {}7};8 9#ifdef FILE110# define FUNC_NAME func111# define FUNC_BODY \12    S::foo(); S::bar(); S::baz();13#else14# define FUNC_NAME func215# define FUNC_BODY \16    S::bar();17#endif18 19void FUNC_NAME() {20  FUNC_BODY21}22 23// Build instructions:24// $ clang -g -fPIC -c -DFILE1 arange-overlap.cc -o obj1.o25// $ clang -g -fPIC -c arange-overlap.cc -o obj2.o26// $ clang -shared obj1.o obj2.o -o <output>27