f1()1*79c3d8b1SDavid Blaikie void f1() {}
f2()2*79c3d8b1SDavid Blaikie __attribute__((always_inline)) inline void f2() {
3*79c3d8b1SDavid Blaikie   f1();
4*79c3d8b1SDavid Blaikie }
5*79c3d8b1SDavid Blaikie // throw a gap in the address range to force use of DW_AT_ranges, ranges_base,
6*79c3d8b1SDavid Blaikie // range contribution in the .dwo file, etc.
gap()7*79c3d8b1SDavid Blaikie __attribute__((nodebug)) void gap() {
8*79c3d8b1SDavid Blaikie }
main()9*79c3d8b1SDavid Blaikie int main() {
10*79c3d8b1SDavid Blaikie   f2();
11*79c3d8b1SDavid Blaikie }
12*79c3d8b1SDavid Blaikie 
13*79c3d8b1SDavid Blaikie // To produce split-dwarf-dwp.o{,dwp}, Create another file that has ranges, so
14*79c3d8b1SDavid Blaikie // the ranges_base of the CU for split-dwarf-dwp.cpp is non-zero.
15*79c3d8b1SDavid Blaikie //
16*79c3d8b1SDavid Blaikie //   $ cat > other.cpp
17*79c3d8b1SDavid Blaikie //   void other1() {}
18*79c3d8b1SDavid Blaikie //   __attribute__((nodebug)) void other2() {}
19*79c3d8b1SDavid Blaikie //   void other3() {}
20*79c3d8b1SDavid Blaikie //   $ clang++ other.cpp split-dwarf-dwp.cpp -gsplit-dwarf -c -Xclang -fdebug-compilation-dir -Xclang . -fno-split-dwarf-inlining
21*79c3d8b1SDavid Blaikie //   $ llvm-dwp other.dwo split-dwarf-dwp.dwo -o test/DebugInfo/Inputs/split-dwarf-dwp.o.dwp
22*79c3d8b1SDavid Blaikie //   $ ld -r other.o split-dwarf-dwp.o -o test/DebugInfo/Inputs/split-dwarf-dwp.o
23