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