diff options
Diffstat (limited to 'llvm/test/tools/dsymutil/X86/thinlto.test')
-rw-r--r-- | llvm/test/tools/dsymutil/X86/thinlto.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/tools/dsymutil/X86/thinlto.test b/llvm/test/tools/dsymutil/X86/thinlto.test new file mode 100644 index 000000000000..ebd4068a5c12 --- /dev/null +++ b/llvm/test/tools/dsymutil/X86/thinlto.test @@ -0,0 +1,24 @@ +$ cat foo.cpp +struct nontrivial { + nontrivial() { } +}; + +void function2() +{ + static const nontrivial magic_static; +} + +$ cat bar.cpp +void function2(); + +void function1() +{ + function2(); +} + +$ xcrun clang++ -g -flto=thin -O2 foo.cpp bar.cpp -c +$ xcrun clang++ -flto=thin foo.o bar.o -Xlinker -object_path_lto -Xlinker lto -shared -o foobar.dylib + +RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty +CHECK-NOT: could not find object file symbol for symbol __ZZ9function2vE12magic_static +CHECK-NOT: could not find object file symbol for symbol __ZGVZ9function2vE12magic_static |