[clang] 77ef5a6 - [Clang][NFC] Fix a test failure with mold linker (#122587)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 11 03:17:13 PST 2025


Author: Younan Zhang
Date: 2025-01-11T19:17:09+08:00
New Revision: 77ef5a601ad3827316e412788f609e9141b51e83

URL: https://github.com/llvm/llvm-project/commit/77ef5a601ad3827316e412788f609e9141b51e83
DIFF: https://github.com/llvm/llvm-project/commit/77ef5a601ad3827316e412788f609e9141b51e83.diff

LOG: [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

Added: 
    

Modified: 
    clang/test/LibClang/symbols.test

Removed: 
    


################################################################################
diff  --git a/clang/test/LibClang/symbols.test b/clang/test/LibClang/symbols.test
index fd2ff8bc6cd423..e12b4c9991b811 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_[^.$]\+$'


        


More information about the cfe-commits mailing list