1*3d6c7d6eSJonas Devlieghere$ cat foo.cpp 2*3d6c7d6eSJonas Devliegherestruct nontrivial { 3*3d6c7d6eSJonas Devlieghere nontrivial() { } 4*3d6c7d6eSJonas Devlieghere}; 5*3d6c7d6eSJonas Devlieghere 6*3d6c7d6eSJonas Devliegherevoid function2() 7*3d6c7d6eSJonas Devlieghere{ 8*3d6c7d6eSJonas Devlieghere static const nontrivial magic_static; 9*3d6c7d6eSJonas Devlieghere} 10*3d6c7d6eSJonas Devlieghere 11*3d6c7d6eSJonas Devlieghere$ cat bar.cpp 12*3d6c7d6eSJonas Devliegherevoid function2(); 13*3d6c7d6eSJonas Devlieghere 14*3d6c7d6eSJonas Devliegherevoid function1() 15*3d6c7d6eSJonas Devlieghere{ 16*3d6c7d6eSJonas Devlieghere function2(); 17*3d6c7d6eSJonas Devlieghere} 18*3d6c7d6eSJonas Devlieghere 19*3d6c7d6eSJonas Devlieghere$ xcrun clang++ -g -flto=thin -O2 foo.cpp bar.cpp -c 20*3d6c7d6eSJonas Devlieghere$ xcrun clang++ -flto=thin foo.o bar.o -Xlinker -object_path_lto -Xlinker lto -shared -o foobar.dylib 21*3d6c7d6eSJonas Devlieghere 22*3d6c7d6eSJonas DevlieghereRUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty 23*3d6c7d6eSJonas DevlieghereCHECK-NOT: could not find object file symbol for symbol __ZZ9function2vE12magic_static 24*3d6c7d6eSJonas DevlieghereCHECK-NOT: could not find object file symbol for symbol __ZGVZ9function2vE12magic_static 25