From 4c980f19b97434ee799033a65555192e8ab1dc49 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 11 Jan 2025 19:17:09 +0800 Subject: [PATCH] [Clang][NFC] Fix a test failure with mold linker (#122587) Mold prefers the suffix '$' for symbols like PLT and GOT entries, so exclude these symbols as well. Otherwise, this test will fail for developers using mold-linked Clang. Closes https://github.com/llvm/llvm-project/issues/76982 --- clang/test/LibClang/symbols.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/LibClang/symbols.test b/clang/test/LibClang/symbols.test index fd2ff8bc6cd4..e12b4c9991b8 100644 --- a/clang/test/LibClang/symbols.test +++ b/clang/test/LibClang/symbols.test @@ -1,6 +1,6 @@ # Check that there are no unversioned clang symbols in libclang.so RUN: llvm-nm -Dj --defined-only %libclang | grep -v -e '@@LLVM_[0-9]\+$' | not grep '^clang' -# Check that here are no local clang_ symbols (ignoring symbols with .cold or +# Check that there are no local clang_ symbols (ignoring symbols with .cold or # .localalias suffxies.) -RUN: llvm-nm %libclang | not grep '[a-z] clang_[^.]\+$' +RUN: llvm-nm %libclang | not grep '[a-z] clang_[^.$]\+$' -- Gitee