-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dsymutil] Fix spurious warnings for missing symbols with thinLTO
Fix spurious warnings for missing symbols with thinLTO. The latter appends a unique suffix to avoid collisions for exported private symbols, resulting in dsymutil complaining it couldn't find the symbol in the object file. rdar://75434058 Differential revision: https://reviews.llvm.org/D99125
- Loading branch information
1 parent
b37d0a4
commit 3d6c7d6
Showing
7 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.45 KB
llvm/test/tools/dsymutil/Inputs/private/tmp/thinlto/lto/0.x86_64.thinlto.o
Binary file not shown.
Binary file added
BIN
+2.47 KB
llvm/test/tools/dsymutil/Inputs/private/tmp/thinlto/lto/1.x86_64.thinlto.o
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters